【发布时间】:2018-01-13 14:22:37
【问题描述】:
我在 Windows 机器上尝试将代码推送到运行 ubuntu 的 ec2 实例上的远程 git 存储库。我已经设置了实例并在实例的某个位置创建了一个裸仓库。
我在实例上有我的公钥,因为我可以通过 putty 和我安装的 openssh 软件 ssh 到它。
我签了
git push heroku master Permission denied (publickey)
Git - Permission denied (publickey)
但建议的解决方案对我来说不是很清楚
我可以使用 ssh -i mykey.pem ubuntu@1.1.1.1 SSH 进入实例。
问题是我已将 repo 添加到我的遥控器列表中,但是当我尝试使用从本地 master 推送到远程 repo 时,我不断收到以下错误
production - ssh://ubuntu@ec2-1-1-1-1.compute-1.amazonaws.com
git push production master
错误
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
【问题讨论】:
标签: git ubuntu github amazon-ec2 ssh