Hi i'm having trouble pulling in a remote endpoint.
command to connect from remote google compute engine:
ssh -i /path/.ssh/google_compute_engine NAME@REMOTEIP "cd /home/repo/; git pull origin dev"
Connection via ssh to remote endpoint is working. When i do manually my git pull is working but when i try to pass commands line as arguments it fail :
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Also if i try to add my ssh:
ssh -i /path/.ssh/google_compute_engine NAME@IP "cd /home/repo; ssh-add ~/.ssh/rsa_pub"
it fail:
Could not open a connection to your authentication agent.
ssh -i /path/.ssh/google_compute_engine NAME@IP "ls /home; cd /home/repo; eval ssh-agent;"
return :
SSH_AGENT_PID=311; export SSH_AGENT_PID;
echo Agent pid 311;
I have to use it like this to make a script for production.
I don't find a way to do it, and also avoid entering passphrase so it will automatically pull as i launch of the command below. Can i somehow pass my the rsa_pub as parameter ?