You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHub desktop should be able to prompt for SSH key passphrase #8761
When we followed the instructions for setting up SSH keys, that involves making a passphrase. Then when we started using Github desktop, it will not clone or pull the repos. It gives error message about authentication failure. It suggested logging in again and that didn't help. It seems like the desktop app does not prompt for SSH key passphrase when it should.
Then we created a new SSH key without passphrase and the problem was solved.
We know that there could be some Windows ssh-agent workarounds that we could be missing but it would be cool if the app just prompts for passphrase and do the right thing. 😄
Reacted by Sergio Lepore, Mike Koss, Cloud2 Software, Robert Jordan, number005, Baratux, ooOH, Simon Hardt, Miles Danswan, Kai and 5 more
Thanks for contributing @anqinxu. We have a collection of known SSH limitations catalogued in #2579 (including the SSH passphrase issue), so I'm going to close this issue out in favor of that one and add your feedback there.
@kevincantu thanks for sharing how you were able to get things working -- that's helpful!
I think it's more severe than the part you've quoted there, @steveward: the only way to run GitHub Desktop if you're using SSH keys with passphrases is to open Git Bash, set up ssh-agent, and run %appdata%\whatever\whatever\GitHubDesktop.exe.
Starting it by clicking the icons installed by the installer isn't sufficient, and this is not obvious.
Reacted by Daniel Kay, Robert Jordan, Kiwi and Amilcar Serrano
@kevincantu it sounds like your ssh-agent-PID isn't getting picked up by GitHub Desktop -- you should be able to just run github from the command line rather than using the %AppData% path to fix this. I'm working on a SSH guide for GitHub Desktop where I'll make a note of this.
Still having this issue, starting Github Desktop with Git Bash and entering the passphrase with every action made in Github Desktop isnt a solution. Has noone tackled this issue yet?
Without a detour obviously, I'll propably try the .bashrc "solution" in the meanwhile.
Hi, would just like to chime in- as of 6 Feb 2025, Github Desktop encounters an infinite loop of 'cloning repository' when a SSH key with passphrase is used. Unsure if there are any workarounds- no prompts are appearing on my end.
Hi, would just like to chime in- as of 6 Feb 2025, Github Desktop encounters an infinite loop of 'cloning repository' when a SSH key with passphrase is used. Unsure if there are any workarounds- no prompts are appearing on my end.
Activity
kevincantu commentedon Dec 7, 2019
A screenshot of the error when trying to fetch:
One ssh-agent workaround we found requires:
And never ever starting GitHub Desktop from the desktop icon, etc! 🙀
It'd be nice if it just prompted, like @anqinxu suggests. 😺
steveward commentedon Dec 9, 2019
Thanks for contributing @anqinxu. We have a collection of known SSH limitations catalogued in #2579 (including the SSH passphrase issue), so I'm going to close this issue out in favor of that one and add your feedback there.
@kevincantu thanks for sharing how you were able to get things working -- that's helpful!
kevincantu commentedon Dec 9, 2019
I think it's more severe than the part you've quoted there, @steveward: the only way to run GitHub Desktop if you're using SSH keys with passphrases is to open Git Bash, set up ssh-agent, and run %appdata%\whatever\whatever\GitHubDesktop.exe.
Starting it by clicking the icons installed by the installer isn't sufficient, and this is not obvious.
steveward commentedon Dec 13, 2019
@kevincantu it sounds like your
ssh-agent-PIDisn't getting picked up by GitHub Desktop -- you should be able to just rungithubfrom the command line rather than using the%AppData%path to fix this. I'm working on a SSH guide for GitHub Desktop where I'll make a note of this.Bubbleinpit commentedon Jan 4, 2021
On Win10, you can install open ssh and try this to setup ssh-agent: https://code.visualstudio.com/docs/remote/troubleshooting#_setting-up-the-ssh-agent
gpbonillas commentedon Mar 12, 2021
Thanks! It helped me a lot.
mckoss commentedon Apr 19, 2021
I have to do a similar thing using GitBash on Windows 10.
My .gitbashrc is (which must be run via $ source .gitbashrc if not included in shell start):
and then I put this script in my path to run githubdesktop:
hardysim commentedon Jun 11, 2021
This is working fine (#8761 (comment)). But it seems that GitHub Desktop already adds itself as
githubto the path:flavio-marchi commentedon Aug 11, 2021
Still having this issue, starting Github Desktop with Git Bash and entering the passphrase with every action made in Github Desktop isnt a solution. Has noone tackled this issue yet?
Without a detour obviously, I'll propably try the
.bashrc"solution" in the meanwhile.steveward commentedon Aug 11, 2021
@flaviosb this is being addressed in #12756.
flavio-marchi commentedon Aug 12, 2021
@steveward Looks promising, thanks!
sergiou87 commentedon Aug 19, 2021
Latest beta should include this already 😄
billygriffin commentedon Aug 26, 2021
We released this to production this week, so please let us know how it's working!
ActionKeith commentedon Sep 6, 2021
Hi @billygriffin -- Eagerly awaiting.
Any high level guidance on how much time delay to expect for MacOS?
sergiou87 commentedon Sep 7, 2021
@keithhelfrich version 2.9.3 already has support for this on macOS. Is it not working for you? 😳
laukstein commentedon Jan 3, 2022
In Windows 10 you can try solution explained in https://superuser.com/a/1296046/473500

ActionKeith commentedon Jan 4, 2022
sergiou87 commentedon Jan 4, 2022
@keithhelfrich version 2.9.3 already has support for this on macOS. Is it not working for you? 😳
nochet2211 commentedon May 31, 2022
Version 3.0.0 ....MacOs Monterey..No prompts for me :(
ByteToHex commentedon Feb 6, 2025
Hi, would just like to chime in- as of 6 Feb 2025, Github Desktop encounters an infinite loop of 'cloning repository' when a SSH key with passphrase is used. Unsure if there are any workarounds- no prompts are appearing on my end.
I am on Windows.
josephtarbit commentedon Jan 23, 2026
Still getting this issue too