mims
December 8, 2017, 9:26am
1
Hi,
Since I migrated my gitlab server to another server (backup and restore went well), the GitLab runner tries to clone my repo using HTTP Basic Auth.
Cloning repository…
Cloning into ‘/builds/Wordpress/blog’…
remote: HTTP Basic: Access denied
fatal: Authentication failed for ‘https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.xxx.com/Wordpress/blog.git/ ’
ERROR: Job failed: exit code 1
Previously my runners were cloning the repos using SSH.
Is there a setting for that?
Thank you for your help
mims
December 8, 2017, 8:48pm
2
Ok, I solved the issue.
I re registered the CI and all worked fine.
shinya
December 12, 2017, 11:49am
4
How is the output by gitlab-runner verify
? That diagnoses whether your runners are properly configured or not.
mims
December 14, 2017, 1:32pm
5
The result is
# gitlab-runner verify
Running in system-mode.
Verifying runner... is alive runner=8b4c3acc
Verifying runner... is alive runner=91939f64
Here is my config.toml
[[runners]]
name = "Database-audit runner."
url = "https://gitlab.***.com/"
token = "***"
executor = "docker"
[runners.docker]
tls_verify = false
image = "php:5.6"
privileged = true
disable_cache = false
volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock"]
shm_size = 0
[runners.cache]
mims
December 23, 2017, 7:07am
7
In my case, the problem was that docker didn’t take into account the /etc/hosts file from the server. So when it was trying to checkout the project, it did it on my other gitlab server.(DNS)