I have done the following steps to setup ssh deployment keys with our git repo for it to be able to git pull without a username and password:
Note: I am on AWS EC2 / Ubuntu 14.04.3
ssh-keygen -t rsa -b 4096 -C "[email protected]"
these are then saved as id_rsa and id_rsa.pub in ~/.ssh/sudo git pull [email protected]:ownersUsername/OurRepo.git
and get the following errorPermission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Another Note: This repository is private under another users account.
Also, when I try ssh [email protected]
I get:
Hi userName/Repo! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.
And the deployment key comes up as being used. Have been on this issue for greater than 4 hours now and any would would be very much appreciated, thanks.
The problem is you're using sudo, which runs the command as root, and it will try to use the root's keys not your user's keys.
What you want to do is:
/var/www
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