desktop: Authentication failed when pushing to my repository
Description
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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 15 (3 by maintainers)
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.
Interesting, I downloaded PuTTY yesterday and it included PuTTYgen with the ED25519 option. Pageant seems to support it (Windows 7 64bit):
Iām late to the party but iāve also struggled with this (iām not using any extension though, just command line).
My problem was related to a probably outdated TortoisePlink.exe that i think was bundled with git for windows. What i did was to
The last step is required because apparently thereās something weird happening between git bash and plink.exe so that when the terminal is asking
Store key in cache? (y/n), your keyboard input wonāt be piped properly and your compulsive āYā strokes will be lost in the empty void.If you are having a similar issue, you should see a popup window with this message
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.if you didnāt get this fixed with any of the above suggestion then open task manager while that popup is still opened, search the window name in the applications list, then right click and āgo to processā, then right click the process and āgo to fileā. Your problem most likely is in that very file. Cheers.
I had the same issue with GitExtensions although I had it configured to use separately installed PuTTY 0.70. Instead of using
plink.exefrom the path in the SSH settings, GitExtensions was using the bundled version. After renamingC:\Program Files (x86)\GitExtensions\PuTTYtoC:\Program Files (x86)\GitExtensions\PuTTY2and redefining the paths in SSH settings it started to work.It worked when I deleted all my private keys from GitHub.com and then re-added public key for the same key I used before. Strangeā¦
@NichUK please also try updating your Git for Windows installation. If youāre still unable to push, Git for Windows is the place to report an issue.