gitdb.exc.BadName: Ref 'c823f99' did not resolve to an object
When pushing to github/gitlab git mirrors, there is an odd crash that prevents it from completing the push:
INFO: Mirroring to: git@gitlab.com:guardianproject/fdroid-repo
INFO: Mirroring to: git@github.com:guardianproject/fdroid-repo
DEBUG: Adding all files to git mirror
DEBUG: Committing all files into git mirror
DEBUG: Writing .gitlab-ci.yml to deploy to GitLab Pages
DEBUG: Pushing to git@gitlab.com:guardianproject/fdroid-repo
[ ] 1/241 - 00:15:47
...snip...
[################################] 241/241 - 00:00:00
[ ] 1/256 - 00:00:00
...snip...
[################################] 256/256 - 00:00:03
[## ] 1/13 - 00:08:39
[####### ] 3/13 - 00:10:28
[######### ] 4/13 - 00:10:28
[############ ] 5/13 - 00:10:28
[################# ] 7/13 - 00:10:28
[################################] 13/13 - 00:10:28
[################################] 13/13 - 00:10:28
DEBUG: Removing .gitlab-ci.yml now that it has successfully deployed
DEBUG: Pushing to git@github.com:guardianproject/fdroid-repo
[ ] 1/241 - 06:50:36
...snip...
[################################] 241/241 - 00:00:00
[ ] 1/256 - 00:00:00
...snip...
[################################] 256/256 - 00:01:14
[## ] 1/13 - 00:11:58
[####### ] 3/13 - 00:11:58
[######### ] 4/13 - 00:11:58
[############ ] 5/13 - 00:11:58
[################# ] 7/13 - 00:11:58
[################################] 13/13 - 00:11:58
[################################] 13/13 - 00:11:58
ERROR: Line handler exception on line: + refs/heads/master:refs/heads/master c823f99...5b1c651 (forced update)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/git/cmd.py", line 114, in _dispatch_single_line
handler(line)
File "/usr/lib/python3/dist-packages/git/remote.py", line 593, in stdout_handler
output.append(PushInfo._from_line(self, line))
File "/usr/lib/python3/dist-packages/git/remote.py", line 161, in _from_line
old_commit = remote.repo.commit(old_sha)
File "/usr/lib/python3/dist-packages/git/repo/base.py", line 427, in commit
return self.rev_parse(text_type(rev) + "^0")
File "/usr/lib/python3/dist-packages/git/repo/fun.py", line 183, in rev_parse
obj = name_to_object(repo, rev[:start])
File "/usr/lib/python3/dist-packages/git/repo/fun.py", line 117, in name_to_object
raise BadName(name)
gitdb.exc.BadName: Ref 'c823f99' did not resolve to an object
[################################] 13/13 - 00:17:19