Src refspec master does not match any


Dear GitLab community,

out of sudden my deployment jobs are failing with message “src refspec master does not match any”.
I did some research and I have absolutely no idea why.
However, when I compare current deployment job log with previous one I see this difference:

Current (Not working):
Running on runner-72989761-project-4417089-concurrent-0 via runner-72989761-srm-1552747221-b30389b8…
Initialized empty Git repository in /builds/xxx
Fetching changes…
Created fresh repository.

  • [new branch] master -> origin/master
    Checking out 3e494a44 as master…

Running on runner-ed2dce3a-project-4417089-concurrent-0 via runner-ed2dce3a-srm-1533052716-d10a913c…
Cloning repository…
Cloning into '/builds/xxx
Checking out 14e42d69 as master…

Why it is suddenly initializing an empty git repository instead of just cloning?
Any idea will be appreciated.

Thank you.


I have the same issue, it’s just happened currently when was deploying React to Heroku


I have noticed that deployments are not actually failing out of sudden but it happens after Gitlab Runner was updated to ver. 11.9+

For some reason the latest version of runner is always initializing an empty git repository instead of just cloning.

Any idea how to solve this?