It’s Cybersecurity Awareness Month! Join our interactive training session, or learn about security and AI from 1Password experts.
Forum Discussion
arnaudb
2 years agoNew Contributor
SSH Agent : Connection refused
Not sure if it's related to an update, everything was working fine so far.
I can't get the agent to load the keys on git requests anymore.
The problem :
git fetch
git@github.com: Permission...
Michael_Mercuri
2 years agoFrequent Contributor
I replied earlier, but not sure what happened to it.
One issue with GitHub is your config is specifying github.com-arnaudb as the host, but the git fetch command in your original post is using github.com:
git fetch git@github.com: Permission denied (publickey)
It's also notable that based on the error, Permission denied (publickey), your public key was obtained and tried.
For troubleshooting, try making the following updates to your ~/.ssh/config:
Host github.com-arnaudb github.com
User git
Hostname github.com
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
ForwardAgent yes`
(note User git added and Host updated to include github.com.)
Then try issuing ssh -v -T git@github.com.
If it works you should see:
Hi <your GitHub username>! You've successfully authenticated, but GitHub does not provide shell access.
The -v option will help determine which keys (if any) were tried.
But none of this explains why the ssh-add -l command you posted with SSH_AUTH_SOCK set is receiving a connection refused error.