简体   繁体   中英

EC2: Git clone without GitHub

I have a set of repos I wanted to move to EC2. I cloned them as bare repositories and put them onto an EBS volume mounted to an EC2 instance. I set the remote properly (points to the ssh:publicdnsname/gitRepo) and attempted to perform a clone from my local machine - only to find that I got the

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I am trying to figure the best way to host a series of git repos on an EBS volume that will allows access to 10 or so team members to do pulls, merges, etc.

Any suggestions to a simple way to handle this problem?

Sorry I figured out the problem.

I did not have a user on the host machine and therefore it was trying to pull for a user that didn't exist. (I was trying ssh://ubuntu@machine/example/git.git)

Doing a simple

ssh-add mykey.pem
git clone ssh://ubuntu@machine... ..

This worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM