I am trying to connect to Github from a server running Jenkins.
To do this, I'm copying my public key from another server, into the authorized_keys on the new server.
All I'm getting is the following error:
git ls-remote -h email@example.com:Company/client.git HEAD Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly
All I did was this:
Go into the .ssh directory on the user account I want, on the old server
Copy the public key, in id_rsa.pub.
Log into the new server, go into /root/.ssh, and put that key into "authorized_keys"
Attempt the above command.
What am I doing wrong? My suspicion is that I'm not copying the key to the correct location, and that in actuality I want to have the entire id_rsa.pub as well as the private key up there, and I'm actually trying to copy a user setting - but I'm not quite sure.
How do I access github from this new server?