[SOLVED]CI wants to clone my repos with HTTP Basic Auth


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

Ok, I solved the issue.

I re registered the CI and all worked fine.

Issue still occurs…

gitlab-config-template 10.2.4
gitlab-cookbooks 10.2.4
gitlab-ctl 10.2.4
gitlab-healthcheck a596f019c73c7aeb89ddd912d237addf
gitlab-monitor v1.9.0
gitlab-pages v0.6.0
gitlab-psql ff26e3be21c690dd34db5cc8fc6c9b55
gitlab-rails v10.2.4
gitlab-scripts 10.2.4
gitlab-selinux 10.2.4
gitlab-shell v5.9.4
gitlab-workhorse v3.3.1

gitlab-runner -v
Version: 10.2.0
Git revision: 0a75cdd1
Git branch: 10-2-stable
GO version: go1.8.3
Built: Wed, 22 Nov 2017 09:19:04 +0000
OS/Arch: linux/amd64

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

I still have the issue :confused:

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)