Src refspec master does not match any


#1

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.
From https://gitlab.com/xxx

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

Previous:
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.


#2

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


#3

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?