Suddenly unable to push to a fork of a private repo (repo owner gave me full access to his repo)

All was working, I pushed successfully prior the issue, but suddenly when I tried to push again git tower gave me the error:

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

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

I deleted ad added again the same SSH key in github settings, the isssue persisted. Owner saying he can’t see any problem on his side and I’m having full access.

What should I try to solve this?

@andreyvolokitin this is also happening to me. I think this is an issue on GitHub’s end.

If you do:

GIT_SSH_COMMAND="ssh -v" git push

You’ll probably see this somewhere in there:

debug1: Offering public key: [...]
debug1: Server accepts key: [...]
debug1: Authentication succeeded (publickey).
Authenticated to ([]:22).

Meaning, auth has succeeded – so it’s probably not your key.

GitHub currently has an incident open which is probably related.

1 Like

Still facing the same issue although incident mentioned in last comment has been marked resolved by github. Any workarounds or suggestions please ?

Hi @nkhatwani-unicommerce, this does seems strange that something would suddenly stop working if you changed nothing , and would be surprised if it was a GitHub issue just for you…

Other things you could look at are
You could check this API list-repositories-for-the-authenticated-user which will list repositories that the authenticated user has explicit permission on (:read, :write, or :admin) to access.

You can also authenticate to git using a personal access token (need to adjust your remote URL as well I believe), as another test, this will confirm the permissions you have on the repository (remember to use the https URL specification)

Also access the repository again in the GUI and grab the SSH URL once more to ensure no typos have creeped in somehow.

If personal access token works and SSH does not, we can then dig further into what your SSH problem may be.

Thanks @byrneh, please refer to trailing messages to this thread by andreyvolokitin and eabruzzese. They are also facing same issue and also talks about an github incident which could be probably related. Also, this issue is now spread across our organization and faced by multiple developers.

Steps to reproduce the issue:

  1. git remote add upstream_sakshi

  2. git checkout -b test_989 upstream_sakshi/989
    Branch ‘test_989’ set up to track remote branch ‘989’ from ‘upstream_sakshi’.
    Switched to a new branch ‘test_989’

  3. git push test_989
    fatal: ‘test_989’ does not appear to be a git repository
    fatal: Could not read from remote repository.

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

  1. git push upstream_sakshi test_989
    Total 0 (delta 0), reused 0 (delta 0)
    remote: Create a pull request for ‘test_989’ on GitHub by visiting:
  • [new branch] test_989 → test_989

Step 3 is failing but step 4 pushed a new branch altogether even though it was tracking an existing remote branch. Clearly there is no access issue and multiple devs in team have started facing the same.