Git and Amazon EC2 public key denied
Posted
by
MrNart
on Server Fault
See other posts from Server Fault
or by MrNart
Published on 2012-09-02T18:06:55Z
Indexed on
2012/09/03
15:40 UTC
Read the original article
Hit count: 263
I had git working before on /var/html/projectfolder and realized it was a security risk so I made a new folder /projects from the root folder and tried to replicate what I did and now it doesnt work.
Here is the backlog of what I did for my local machine and EC2 - server
Server-EC2 1.I added my public key to the authorized_user file in ~/.ssh folder 2.Create a bare repository
git init --bare
3.Change folder permissions to
sudo chgrp -R ec2-user *
sudo chmod -R g+ws *
Local Machine
- create a local repository with git init
- touch, add, commit readme file
pointed origin master to ec2 via
git remote add origin ssh://ec2-user@remote-ip/path/to/folder
This is my output:
Permission Denied (publickey)
fatal: The remote end hung up unexpectedly
© Server Fault or respective owner