Eag*_*gle 5 git ssh bitbucket amazon-ec2 amazon-web-services
我将Amazon EC2实例用作开发服务器,并且尝试git将我的存储库从bitbucket克隆到Amazon EC2实例。我想做的是将钩子提交提交添加到bitbucket,以便所有提交到存储库的更改自动反映到我的开发服务器。
我将ssh槽连接到我的Amazon EC2实例,但是当我尝试git克隆存储库时,出现以下错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我找到了许多有关此问题的解决方案,但似乎都没有用!
到目前为止,这是我尝试过的:
创建的弹性ip并与我的实例关联
-修改了安全组以允许入站网络流量
-从亚马逊下载生成的Pem密钥,并使用puttygen生成私钥和公钥
-将公钥(id_rsa.pub)和pem密钥上载到我的.ssh文件夹,并将权限更改为600
-将公钥添加到bitbucket部署密钥中
-将公钥添加到亚马逊上的authorized_keys文件中
-在.ssh文件夹中创建了一个配置文件,并在其中添加了以下几行:
Host bitbucket.org
Hostname bitbucket.org
User ubuntu
IdentityFile ~/.ssh/amzon_key.pem
-试图以root用户身份git克隆存储库
我在Windows上使用腻子。
OP 的解决方案。
我做了什么来让它发挥作用:
-从.ssh文件夹中删除了配置文件
- 使用 puttygen 创建新的私钥和公钥 (dsa - 1024)
- 将公钥添加到 bitbucket 部署密钥中
- 将公钥添加到 .ssh 文件夹中的 amazonauthorized_keys 文件中
- 将密钥上传到 .ssh 文件夹并将权限设置为 600
- 将 bitbucket.org 添加到 .ssh 文件夹中的known_hosts 文件列表中
| 归档时间: | 
 | 
| 查看次数: | 1712 次 | 
| 最近记录: |