We have a setup where our git server needs the publickeys to authenticate in order to push or pull. I am trying to do so on one of our servers and can't figure out why it isn't working. I have searched and searched and everything I have found says to just run ssh -A
when logging into the server and that should forward what is needed to allow git operations, but it isn't working.
On my local machine, I can cd into a directory, run git push origin master
type in my password for ~/.ssh/id_rsa and it works perfectly.
When logging into the server I tried using ssh-add ~/.ssh/id_rsa
putting in my password, then running ssh -A [user]@[server]
and it logs in fine, I then cd into the directory and run git pull
to which I am given permission denied (publickey)
I can't figure out why it is not allowing me to push or pull from the server, it works locally, and I am using the -A flag when ssh-ing into the server, but always permission denied (publickey)
Hopefully someone much more skilled in server stuff can see that I am just doing something wrong and it's an easy fix. Thank you all, I appreciate the time and help