Ssh-agent is running. Authentication failed. I cannot push on repos I cloned using git bash.
See original GitHub issueFollowing up on: https://github.com/desktop/desktop/issues/7311
Steps to reproduce:
- In Windows Git Bash do:
git clone git@github.com:pressbooks/pressbooks-cas-sso.git
- Work on files.
- In GitHub Desktop do: File -> Add Local Repository (CTRL + o)
- Add the repo.
- Commit changes.
- Click the push button.
Expected: Changes are pushed. Actual: Authentication failed.
Important. If I go to the prompt and do git push
everything works fine. It’s not a permissions issue. Windows Git Bash is setup and working.
I’m on Windows. I use ConEmu terminal. The ssh-agent is started using this method:
https://conemu.github.io/en/SshAgent.html#step-by-step
When I start ConEmu it looks like this:
This let’s me have multiple Git Bash terminals open, and I don’t have to enter my paraphrase over and over. Once I enter my paraphrase, that tab closes, and ssh-agent
is running:
https://github.com/desktop/desktop/issues/5641#issuecomment-421801704 is suggesting I force use OpenSSH for Windows build of SSH, but that isn’t what I’m using.
I tried editing .gitconfig
[core]
sshCommand = 'C:/Program Files/Git/usr/bin/ssh.exe'
I got:
2019-04-18T14:21:06.744Z - info: [ui] [AppStore] loading 39 repositories from store
2019-04-18T14:21:06.745Z - info: [ui] [AppStore] found account: connerbw (Dac Chartrand)
2019-04-18T14:21:06.917Z - info: [ui] launching: 1.6.5 (Windows 10.0.17763)
2019-04-18T14:21:06.918Z - info: [ui] execPath: 'C:\Users\dac\AppData\Local\GitHubDesktop\app-1.6.5\GitHubDesktop.exe'
2019-04-18T14:21:09.226Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: pressbooks - connerbw (has token)
2019-04-18T14:21:09.752Z - error: [ui] `git -c credential.helper= -c protocol.version=2 push origin issue-1640-b --set-upstream --progress` exited with an unexpected code: 128.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(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.)
More screenshots:
Help?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
Same problem, great write up. I’ve never seen ssh work with this version of github desktop.
I’m going to close this issue out since we are tracking SSH improvements in https://github.com/desktop/desktop/issues/2579. If you are still having problems with using SSH in GitHub Desktop try running
github
from the command line to launch GitHub Desktop – this has fixed various SSH issues for a number of users.