Authentication failed when pushing to my repository
See original GitHub issueDescription
I have a repository that I have used for several months, and suddenly last week I was unable to push my changes. The client shows the following error:
Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository
.
I tried signing out and in again, and still the same issue. I did Repository > Open in Command Prompt
and git push
which gave me a slightly more detailed error:
FATAL ERROR: Couldn't agree a key exchange algorithm (available: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Version
GitHub Desktop version: 1.0.13
OS version: Microsoft Windows [Version 10.0.16299.248]
Steps to Reproduce
- Start GitHub client
- Try to push a changeset
- 😞
Expected behavior: Pushes successfully
Actual behavior: Failed to push
Reproduces how often: 100%
Logs
(The error was parsed as 2: Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.)
2018-02-26T00:13:35.744Z - error: [ui] `git -c credential.helper= fetch --progress --prune origin` exited with an unexpected code: 128.
FATAL ERROR: Couldn't agree a key exchange algorithm (available: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
This section is repeated for each of my failed attempts to sync.
Additional Information
Update: I suspected an old version of PuTTY was the problem (0.66) but upgrading to the latest (0.70) didn’t help.
Update 2:
Still suspecting PuTTY to be related. I deleted the entry for github.com in registry Computer\HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys
and did putty github.com
to add it back. Then I got a different error when trying git push
:
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:15 (3 by maintainers)
Top GitHub Comments
I’m also having the same problem. I’ve tried updating PUTTY, Git Extensions, deleting all my keys from Github and re-adding, re-adding github.com fingerprint, but I still can’t get access to push to my repo. What can I do? I just need to push code!
FATAL ERROR: Couldn’t agree a key exchange algorithm (available: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521) fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
My problem turned out to be an old version of Putty that was bundled with Git Extensions. If you’ve got the latest Putty installed then make sure you don’t have a second version installed somewhere else which is being found. If you don’t have the latest Putty, upgrade.