Fetch with ssh failed when succeed with bash
See original GitHub issueDescribe the bug
Unable to fetch origin with "Authentication failed. Some common reasons include:“
Version & OS
Win10 pro 19041.1165 Github desktop Ver 2.9.0 (x64)
Steps to reproduce the behavior
See actual behaviour.
Expected behavior
Fetch just like git bash.
Actual behavior
Poped windows when fetch.
Bash behaviour:
$ which ssh-agent
/usr/bin/ssh-agent
(base)
$ git -c credential.helper= fetch --progress --prune origin -v
= [up to date] main -> origin/main
= [up to date] Modelling -> origin/Modelling
= [up to date] analytic-solution -> origin/analytic-solution
(base)
git config about ssh:
[core]
sshCommand = "ssh"
(ssh.exe is in C:\Program Files\Git\usr\bin
)
ssh config:
Host uni.github.com
HostName github.com
User git
IdentityFile ~/.ssh/uni
github repo remote:
git@uni.github.com:my_user_name/my_repo_name.git
Screenshots
Add screenshots to help explain your problem, if applicable.
Logs
2021-08-17T12:45:23.384Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 22 repositories took 14.7s of which 0.0s paused, total 14.7s
2021-08-17T12:47:56.686Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.640s)
2021-08-17T12:47:56.686Z - error: [ui] git -c credential.helper= fetch --progress --prune origin
exited with an unexpected code: 128.
stderr:
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. Some common reasons include:
- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.)
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
@Clevin49958 any chance you mistyped your passphrase? There was a bug that is now fixed where the app would store an invalid passphrase.
@Clevin4958 based on your reply it sounds like you were able to get things working, so I am going to close this out. Let us know if you are still having issues.