Amazon ec2 无法从RhinoSecurityLabs克隆CloudGoat

Amazon ec2 无法从RhinoSecurityLabs克隆CloudGoat,amazon-ec2,cloud-security,Amazon Ec2,Cloud Security,我正在尝试在我的AWS Ubuntu 18.04 LTS免费层EC2实例上安装。我遵循了链接站点和中的指示。我还将实例的安全组配置为允许所有流量 但是,当我运行git clone命令时,我得到了“Permission denied”错误。完整输出见下文: sudo git clone git@github.com:RhinoSecurityLabs/cloudgoat.git ./CloudGoat Cloning into './CloudGoat'... The authenticity o

我正在尝试在我的AWS Ubuntu 18.04 LTS免费层EC2实例上安装。我遵循了链接站点和中的指示。我还将实例的安全组配置为允许所有流量

但是,当我运行git clone命令时,我得到了“Permission denied”错误。完整输出见下文:

sudo git clone git@github.com:RhinoSecurityLabs/cloudgoat.git ./CloudGoat
Cloning into './CloudGoat'...
The authenticity of host 'github.com (<ipv4>)' can't be established.
RSA key fingerprint is SHA256:<RSA key fingerprint>.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,<ipv4>' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
sudo git克隆git@github.com:RhinoSecurityLabs/cloudgoat.git./cloudgoat
正在克隆到“/CloudGoat”。。。
无法建立主机“github.com()”的真实性。
RSA密钥指纹是SHA256:。
是否确实要继续连接(是/否)?对
警告:已将“github.com”(RSA)永久添加到已知主机列表中。
git@github.com:权限被拒绝(公钥)。
致命:无法从远程存储库读取。
请确保您拥有正确的访问权限
并且存储库存在。

我是否需要将GitHub上的SSH密钥与我的帐户相关联?如果需要,我该如何做?我不确定在这一点上还有什么可以尝试的。谢谢。

这是因为您在EC2上没有SSH密钥可以验证您对Github的请求。我在个人计算机(不是EC2)上安装Cloudgoat时遇到了相同的错误,在设置SSH密钥(和)时也能正常工作

您可能需要对EC2执行同样的操作,并将公钥添加到git配置文件中