Understanding ssh Agent Forwarding
SSH login works.
git pull doesn’t.
You connect to a server:
ssh root@server
No password. All good.
Then:
git pull origin main
Boom:
Permission denied (publickey)
You check:
ssh-add -L
And get:
Could not open a connection to your authentication agent.
At this point, it feels wrong.
“I logged in using SSH keys… why is Git failing?”
The trap
Logging in via SSH does not mean the server has your keys.