Testing gitlab-runner locally repository not found

runner
test
docker
#1

Hello,

I’m running gitlab-runner locally to test my .gitlab-ci.yaml file but it cannot find the repository. It tries to clone it from a local path that doesn’t exist:

gitlab-runner exec docker --docker-privileged --docker-cache-dir /tmp/gitlabrunner --docker-volumes /tmp/gitlabrunner:/tmp/gitlabrunner --docker-volumes /var/run/docker.sock:/var/run/docker.sock test-buildRuntime platform                                    arch=amd64 os=linux pid=9421 revision=d9b83537 version=11.10.0~beta.1315.gd9b83537
WARNING: You most probably have uncommitted changes. 
WARNING: These changes will not be tested.         
Running with gitlab-runner 11.10.0~beta.1315.gd9b83537 (d9b83537)
Using Docker executor with image xxxx ...
Starting service docker:dind ...
Pulling docker image docker:dind ...
Using docker image sha256:b90ec7b4590e2638ed18d0afff2467a5eea36947c69439a188ed67c3d47e2ef2 for docker:dind ...
Waiting for services to be up and running...
Pulling docker image xxx ...
Using docker image sha256:2ed027798240412e0d5251379ab0ad8c1db8e01764f79d9d3bd5d38f3dd44986 for xxx...
Running on runner--project-0-concurrent-0 via company...
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
Cloning repository...
fatal: repository '/root/git/api' does not exist
ERROR: Job failed: exit code 1
FATAL: exit code 1  

Could you help me on this please? I don’t understand…

Thank you

1 Like

#2

It looks like your GitLab version is not supported.

DEPRECATION: this GitLab server doesn’t support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab

You should try updating it.

0 Likes

#3

Hello,

I should upgrade gitlab-ci?

0 Likes

#4

the deprecation warning shouldn’t be the cause of your problem. You’re running v.11.10 and that should be compatible with your version of gitlab. Gitlab-runner have an option to turn on more logging, that should reveal the repo url you’re trying to clone.

0 Likes

#5

I had the same problem and it was related to fetching submodules. Never got a good workaround, stuck to running CI only in the runners (having to push), never directly on my working copy.

0 Likes