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 into ‘/builds/Wordpress/blog’…
remote: HTTP Basic: Access denied
fatal: Authentication failed for ‘https://gitlab-ci-token:firstname.lastname@example.org/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
Ok, I solved the issue.
I re registered the CI and all worked fine.
How is the output by
gitlab-runner verify? That diagnoses whether your runners are properly configured or not.
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
name = "Database-audit runner."
url = "https://gitlab.***.com/"
token = "***"
executor = "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
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)