We have a pretty standard set up, builds are running on every push to the Gitgub repo, as expected.
I’ve gone to the project settings page, advanced settings, and set “Only build pull requests” to “on”.
Now, Circle shows each new push as “Not run”, as expected, because it should only run tests for pull requests.
However, when I do make a pull request, the build fails because Circle gets this error message:
Warning: Permanently added 'github.com,192.30.253.112' (RSA) 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.
git command i returned 128:
Thanks for reporting this. We’re currently investigating the cause of this behaviour.
As a workaround, can you add a ‘user deploy key’ instead of a ‘project deploy key’ to the affected project. An explanation of what this means and how to do it is on the ‘Project settings > Checkout SSH keys’ screen.
As stated on that page: “Your best bet, for fine-grained access to more than one repo, is to create what GitHub calls a machine user. Give this user exactly the permissions your build requires, and then associate its user key with your project on CircleCI.”
I can confirm that this is a bug on our end. A fix should be available soon.
In the meantime the workaround above will get your projects building (although I realise it’s a bit of work to create the GitHub machine user and set it up appropriately).