Github code checkout suddenly failing

About a week ago CircleCI started failing to checkout code from Github. This happened around the same time that I removed access to the github organisation for some developers who’ve since left the team.

The error that’s being received during the code checkout step is the following:

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '' to the list of known hosts.

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

exit status 128

I hope and assume that this is a matter of re-enabling permissions in Github but I’m at a loss for what is actually needed. Any help would be very gratefully received!

Hey Peter — looks like you already got an answer from us in a ticket, but for those who find this later, I’ll share our suggestions again!

It’s likely the checkout SSH key got removed along with the developer accounts. Resetting webhooks, checkout keys, and deploy keys associated with the project will help us make sure you’re working with a known good setup going forward.

Try the steps in the Support Center article below. Once that’s done, refollow the project on CircleCI, which should allow builds to start again.

How to manually stop building by removing your deploy key and webhook from GitHub

If you’re still having trouble, of course, please do let us know and we’ll be happy to take a look!

Hi Liene,

Thanks for your quick response with this. I followed these instructions and eventually got things working again. However I lost an hour and a half trying to create new SSH keys for Circle to access Github and adding the fingerprint into the circle config file.

What the instructions above don’t mention is that after doing the reset you then need to unfollow and refollow your project and then the SSH keys will regenerate automatically for you and be inserted into Github.

What might help anyone else arriving here too is that unfollowing and refollowing the project is a bit fiddly. However you will know when you’ve done it because the new key will just appear on github and you’ll also get an email from github notifying you that it’s happened.

If you can manage to do that before getting caught in the weeds of generating and registering your ow keys the whole process should be very quick.