ACTIVITY

Timeline

Timeline for the post: Permission denied (publickey) when pushing to remote over SSH after adding a new key

Currently licensed under: CC BY-SA 4.0

2 Events
WhenWhatByLicenseComment
Nov 1, 2026, 9:47:23 AM
3w ago
AnswerdebugdanielCC BY-SA 4.0First verify the client actually offers the key: run ssh -vvv git@git.example.com and look for 'Offering public key' lines and the filename. If your key is not offered, add it to agent with ssh-add or set IdentityFile in ~/.ssh/config. If it is offered but server rejects it, check the server's ~git/.ssh/authorized_keys for the exact public-key line and file permissions (dir 700, file 600, owner git). Tail server auth logs during a failed attempt to see rejection reason. For temporary testing force the key with ssh -i ~/.ssh/id_ed25519 -vvv git@git.example.com; if that succeeds, fix client config. If logs show server-side restrictions (from= options, forced command), involve the server admin to adjust authorized_keys safely.
Nov 1, 2026, 9:47:23 AM
3w ago
CreatednovanetworkCC BY-SA 4.0Permission denied (publickey) when pushing to remote over SSH after adding a new key