Cannot clone Private Git repository with a runner
Summary
Gitlab runner cannot clone a private git repository : leads to a HTTP Basic : Access Denied
error. No trouble while the absolute same project's visibility is set as "public". Same error while setting visibility to "Internal".
Steps to reproduce
- Install Gitlab CE via a Docker image on your server
- Install Gitlab-runner via a Docker image on the same server and configure it using docker executor
- Create a private project
- Create a CI pipeline
- Run this pipeline
Actual behavior
Running with gitlab-runner 10.6.0 (a3543a27) on MyProject Runner bfc98a05 Using Docker executor with image aergus/latex:latest ... Pulling docker image aergus/latex:latest ... Using docker image sha256:611bb0f9ccdf3fa37dade8f7f37618f798548e6b42158d3d160ff2f9f36f5d7e for aergus/latex:latest ... Running on runner-bfc98a05-project-21-concurrent-0 via 085d53b70e50... Cloning repository... Cloning into '/builds/MyNamespace/MyProject'... remote: HTTP Basic: Access denied fatal: Authentication failed for 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@my.server.url/MyNamespace/MyProject.git/' ERROR: Job failed: exit code 1
Expected behavior
Git repository cloning
Environment description
- Docker : 17.05.0-ce, build 89658be
- Gitlab version : 10.6.4
- Gitlab-runner version : 10.6.0 (a3543a27)