0

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?

Havvy
  • 111
  • 3

1 Answers1

1

Alright, I just needed to put my public key on my computer into ~/.ssh/authorized_keys to be able to get this working. Since the file didn't exist, the public key became the only contents of the file.

Havvy
  • 111
  • 3