From an Amazon EC2 instance, I created a new user, webserver
, and created a git repository that is only accessible to webserver
and not the default user. I wish to, from my home computer (also Linux), clone, push, and pull from the repository.
Here is what I get when I try to clone currently (with sensitive information denied):
git clone webserver@ec2-***.compute.amazonaws.com:/home/webserver/path/to/repo reponame
Gives a response of:
Cloning into 'reponame'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What do I need to do to get the publickey protection setup properly?