Git error: "Checkout failed, error: fatal: reference is not a tree:"

For some reason our CI on pull requests started failing a week ago with errors like:

Checkout failed, error: fatal: reference is not a tree: fd05265db8b684e17caf17e57d61fa700b93da76

When I reproduce the build steps locally, I do get the same error. It looks like the git recipe isn’t pulling down all the ref’s from the origin, and the pull request isn’t included. As far as I can tell we’re using a fairly default configuration on the recipe.

Example build:
https://www.bitrise.io/build/5b5f073fca34c0bc

Pull request url:
https://github.com/openid/AppAuth-iOS/pull/87
Commit hash:
fd05265db8b684e17caf17e57d61fa700b93da76

Git clone repository
=> git "init"
=> git "remote" "add" "origin" "git@github.com:openid/AppAuth-iOS.git"
=> git "fetch"
=> git "checkout" "fd05265db8b684e17caf17e57d61fa700b93da76"
Checkout failed, error: fatal: reference is not a tree: fd05265db8b684e17caf17e57d61fa700b93da76
1 Like

Hi,

Can you please check what your webhook URL is on GitHub? We originally had a bitrise.io/hooks endpoint, which still works but new features are not added to it anymore, only to the new, open source hooks.bitrise.io/h/ endpoint.

Related docs: http://devcenter.bitrise.io/webhooks/troubleshooting/

That was it Replaced the webhook in Github with the new URI from the Code tab of the project per the docs and it’s working again.

Thanks!

1 Like

I’ll add it to our task list to finally deprecate the old webhook endpoint, as it starts to cause more and more issues when users try to use newer webhook features which are only available on the new hooks.bitrise.io hook processor.

Thanks for reporting @wdenniss, and Happy Building! :slight_smile: