On March 16th, my site deployed fine[1] after pushing to my repo on Github[2]
Since that time, all deploys have been failing[3]. I even tried to redeploy the same commit that worked on March 16th[4]. The error each time is “Error fetching branch: https://x-access-token:v1.[hash]@github.com/thunderrabbit/barefoot_rob refs/heads/master”
I guess I may have removed the SSH key from Github or something. Would that cause this error? If so, can you send me a new SSH key and a link explaining how to use the key?
I don’t understand everything I know about this, but the failure currently is at a point where previously there was success (duh!). If you did not make a change to your files, did you make a change to your deploy settings? I’m out of ideas here. Sorry.
Thank you for your ideas, Greg… My best guess is that an ssh key got deleted from GIthub. I know I removed some old keys from Github, but I don’t think I removed any for my Netlify site. I did not carefully document my setup and do not recall which keys should be where.
There was an original issue where (I think) some change had been made it the Git repo where the cached version of the repo in the build cache was in a state where updating the repo was failing:
5:56:06 PM: Starting to prepare the repo for build
5:56:06 PM: Preparing Git Reference refs/heads/master
5:56:10 PM: Error fetching branch: https://x-access-token:v1.<redacted>@github.com/thunderrabbit/barefoot_rob refs/heads/master
5:56:10 PM: Failing build: Failed to prepare repo
5:56:10 PM: failed during stage 'preparing repo': exit status 1
5:56:10 PM: Finished processing build request in 13.965550458s
The usual solution for that is to build while clearing the build cache to get a fresh clone of the repo. Here is a screenshot of that setting in the UI:
I actually tried this for that site already. This new deploy attempt is now showing errors for the submodule SSH keys not working:
This is almost certainly because the repo was re-linked. Re-linking does reset the SSH key used. This is the new public key to add at GitHub for this site:
You can use this key with multiple private submodules attached to the same repository, but that does take some extra work since GitHub does not allow Deploy Keys to be used in multiple places. You’ll have to instead add them to a user (perhaps you? or maybe a robot-account that you create on GitHub) that has access to all repos.
If there are other questions about this, we’ll be happy to answer.