Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab Mirror fail to create a branch <branch name> invalid reference name <commit sha>

We have GitHub repositories mirrored to Gitlab. At some point we experienced this error on pull mirroring:

Error: Failed to create branch 'foo/bar/feature-xy': invalid reference name '<commit_sha>'.
like image 394
Stefano Avatar asked Oct 26 '25 17:10

Stefano


1 Answers

The error happened because the Gitlab repository already has a branch called foo/bar, so now Gitlab doesn't allow any new additions that start with foo/bar/*.

In our case, we deleted the branch from Gitlab since, in GitHub, the same branch was already gone, and for some reason, Gitlab doesn't sync.

like image 177
Stefano Avatar answered Oct 29 '25 15:10

Stefano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!