Issue with gitlab runner using shell runner. message: "fatal: Authentication failed" during clone
Summary
I am hitting issue trying to get shell runner to run a CI using Gitlab Enterprise Premium (version 11.4.5) with an omnibus install.
11.4.2 version on the runner, when trying to use a runner either as project runner or group runner as a shell runner we are hitting issue where the git clone is failing:
Cloning repository...
Cloning into '/home/gitlab-runner/builds/e23f3544/0/streng-cloud/legacy/bcb_packer_templates'...
fatal: Authentication failed for 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.bbtnet.com/streng-cloud/legacy/bcb_packer_templates.git/'
bash: line 71: cd: /home/gitlab-runner/builds/e23f3544/0/streng-cloud/legacy/bcb_packer_templates: No such file or directory
ERROR: Job failed: exit status 1
going on the same box as the runner and using the same ID, I am able to clone the repository using my credentials to the project.
Steps to reproduce
(How one can reproduce the issue - this is very important)
- Have gitlab installation at levels mentioned above
- register runner with tags the .gitlab-ci.yml file jobs are expecting
- create pipeline
- first stage fails with above message.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version) I don't have one immediately available for gitlab but this is such an early failure in the processing I can't think its an issue specific to a repo.
What is the current bug behavior?
(What actually happens) clone of repo for build fails.
What is the expected correct behavior?
(What you should see instead) repo should clone and build should commence at level of the checkin.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
See console output above in summary section
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)