Skip to content

git-lfs, gitlab-ci-multi-runner, unable to clone Authentication required: Authorization error

Summary

gitlab-ci-multi-runner using the shell executor tries to run a job, job fails by being unable to pull objects from gitlab git-lfs service.

Steps to reproduce

Cause gitlab-ci job that has to clone/checkout from git-lfs object store on gitlab.

What is the current bug behavior?

Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
  on *redacted*
Using Shell executor...
Running on *redacted*...
Fetching changes...
Removing .gitignore
Removing CMakeCommon.include
Removing CMakeLists.txt
Removing cmake/
Removing docs/
Downloading docs/Presentation.pptx (53.49 KB)
warning: current Git remote contains credentials
Error downloading object: docs/Presentation.pptx

Errors logged to *redacted*/.git/lfs/objects/logs/20170327T112012.951724248.log
Use `git lfs logs last` to view the log.
error: external filter git-lfs smudge -- %f failed 2
error: external filter git-lfs smudge -- %f failed
fatal: docs/Presentation.pptx: smudge filter lfs failed
ERROR: Job failed: exit status 1

Looking in the log referred to above we see:

git-lfs/2.0.1 (GitHub; linux amd64; go 1.8)
git version 2.7.4

$ git-lfs smudge -- docs/Presentation.pptx
Error downloading object: docs/Presentation.pptx

Smudge error: Error downloading docs/Presentation.pptx (*hash*): batch response: Authentication required: Authorization error: https://gitlab-ci-token:*redacted*@gitlab.host.name/project.git/info/lfs/objects/batch

We are currently running gitlab-ci-multi-runner 1.11.1, gitlab-ce 8.17.3 and git-lfs 2.0.1.

We were unable to run gitlab-ci-multi-runner 9.0. It gave a verification error:

Running in system-mode.                            
                                                   
ERROR: Verifying runner... failed                   runner=*hash* status=401 Unauthorized

Using git-lfs version 1.5.6 supplied us with this error:

Downloading docs/Presentation.pptx (53.49 KB)
warning: current Git remote contains credentials
<endless loop>

We are able to successfully clone the project using ssh or https.

What is the expected correct behavior?

The repo should be cloned properly and the git-lfs objects are pulled properly. Then gitlab-ci-multi-runner can run the jobs specified in the YAML.

Relevant logs and/or screenshots

See above. Willing to provide any log that you might think is more helpful.

Output of checks

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

We were able to workaround the issue using the ssh executor.

(If you can, link to the line of code that might be responsible for the problem)

Edited by 🤖 GitLab Bot 🤖