Whenever I try to do a 'git pull origin master' I get (It is NOT Github):
Permission denied (publickey).
I am able to SSH into my AWS EC2 Linux sever, which has the bare repository, which I'm trying to pull from when I get the aforementioned permission error.
I have indeed copied the public key to that server, because I can login successfully via ssh, but only by doing a:
ssh -i /location/of/pemkey/mykey.pem [email protected]
I need to configure Git to use my '.pem' key. How do I accomplish setting up Git to utilize my '.pem' key?
1. touch ~/.ssh/config
2. chmod 644 ~/.ssh/config
3. vim ~/.ssh/config
#write next codeline
host ec2-ip.eu-west-1.compute.amazonaws.com
IdentityFile ~/Documents/ec2-user.pem
git clone [email protected]:/home/git/my-repo.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With