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
I have been trying to set up Cmder to use ssh-agent for authentication, and so far it seems that Cmder itself is using it fine, but when I call git, it ignores ssh-agent entirely.
OS: Windows 11 (22H2)
SSH: OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
Cmder, etc.: up to date
I have loaded a couple keys into ssh-agent, and running ssh-add -l returns the expected result, listing the loaded keys.
When I run ssh -v git@github.com, the output includes the expected references to the loaded keys:
debug1: Will attempt key: ndc\\xxx@yyy RSA SHA256:[redacted] agent
debug1: Will attempt key: ndc\\xxx@yyy RSA SHA256:[redacted] agent
This successfully completes and I get this message at the end:
Hi borisgred! You've successfully authenticated, but GitHub does not provide shell access.
So, this part is alright. However, if I try to use any git commands, it does not attempt any keys from ssh-agent. I changed ~cmder\vendor\git-for-windows\etc\gitconfig so that sshCommand = ssh -v -A, to see verbose output. I also edited ~cmder\vendor\git-for-windows\etc\ssh\ssh_config adding this section:
Now when I run git clone git@github.com:borisgred/sda.git I get the verbose output. I see these lines appear:
debug1: Reading configuration data /c/Users/xxx/.ssh/config
debug1: /c/Users/xxx/.ssh/config line 2: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for github.com
It's definitely reading the configuration files.
The verbose output has no references to the keys stored in ssh-agent. So in the end I get git@github.com: Permission denied (publickey). And that's the end.
What am I missing? How do I get git under Cmder to pay attention to ssh-agent?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been trying to set up Cmder to use ssh-agent for authentication, and so far it seems that Cmder itself is using it fine, but when I call git, it ignores ssh-agent entirely.
OS: Windows 11 (22H2)
SSH: OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
Cmder, etc.: up to date
I have loaded a couple keys into ssh-agent, and running
ssh-add -l
returns the expected result, listing the loaded keys.When I run
ssh -v git@github.com
, the output includes the expected references to the loaded keys:This successfully completes and I get this message at the end:
So, this part is alright. However, if I try to use any git commands, it does not attempt any keys from ssh-agent. I changed
~cmder\vendor\git-for-windows\etc\gitconfig
so thatsshCommand = ssh -v -A
, to see verbose output. I also edited~cmder\vendor\git-for-windows\etc\ssh\ssh_config
adding this section:I also updated
~\.ssh\config
with this section:Now when I run
git clone git@github.com:borisgred/sda.git
I get the verbose output. I see these lines appear:It's definitely reading the configuration files.
The verbose output has no references to the keys stored in ssh-agent. So in the end I get
git@github.com: Permission denied (publickey).
And that's the end.What am I missing? How do I get git under Cmder to pay attention to ssh-agent?
Beta Was this translation helpful? Give feedback.
All reactions