EC2:没有GitHub的Git克隆

EC2:没有GitHub的Git克隆,git,amazon-web-services,ssh,amazon-ec2,Git,Amazon Web Services,Ssh,Amazon Ec2,我有一套回购协议,我想转移到EC2。我将它们克隆为裸存储库,并将它们放在装载到EC2实例的EBS卷上。我将远程服务器正确地指向ssh:publicdnsname/gitRepo,并尝试从本地计算机执行克隆,结果发现我得到了 Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the

我有一套回购协议,我想转移到EC2。我将它们克隆为裸存储库,并将它们放在装载到EC2实例的EBS卷上。我将远程服务器正确地指向ssh:publicdnsname/gitRepo,并尝试从本地计算机执行克隆,结果发现我得到了

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

Please make sure you have the correct access rights
and the repository exists.
我正在试图找到在EBS卷上托管一系列git回购的最佳方式,这样可以让10名左右的团队成员进行拉入、合并等操作


有什么简单的方法来处理这个问题的建议吗?

对不起,我解决了这个问题

我在主机上没有用户,因此它试图为一个不存在的用户拉。我在努力ssh://ubuntu@machine/example/git.git

做一个简单的

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

这很有效。

您是否使用EC2 Linux和密钥对身份验证?如果您使用ssh密钥,请检查它们的文件权限,并确保除您的帐户外,其他任何人都无法读取/写入它们。