I'm in the process of migrating our internal GitLab-CE to GitLab-EE. When checking that CI pipelines work correctly, I noticed that the ones that clone repositories using CI_JOB_TOKEN did not work. After some debugging I managed track down the error to the actually git clone command. The command does not work if the access token is part of the clone URL. To test my hypothesis, I created a personal access token and tried to clone a repository using command
git clone https:\\myusername:accesstoken@gitlab.internal/myusername/project1.git
. The command fails with Authentication error (403 from gitlab nginx).
when I run the same command in interactive mode: git clone https:\\myusername@gitlab.internal/myusername/project1.git
and use my access token as password when I'm prompted the command works fine.
Any idea what the problem is. Is there some configuration setting that disallows the use of passwords/tokens as part of the URL.
P.S. Our server is using self-signed certificate at the moment, but I don't think that's the problem since the second command works fine.