Git Push origin master 遵循 github.com 新存储库上的清单出现错误
这是我第一次使用 git,我不确定发生了什么,也找不到解决问题的答案。
我正在运行:
git commit -m 'first commit'
git remote add origin [email protected]:OldWest/CakePHP-Tutorials.git
git push origin master
每次运行:push origin master 时,我都会收到错误:Permission Denied (publickey)。致命:远程端意外挂起。
因此我运行:ssh-keygen -t rsa
来生成本地密钥。那并没有解决问题。
有人知道为什么这不起作用吗?
This is my first time using git, and I am not sure what is going on, and I can't find an answer that is resolving the problem.
I am running:
git commit -m 'first commit'
git remote add origin [email protected]:OldWest/CakePHP-Tutorials.git
git push origin master
And everytime I run: push origin master, I get error: Permission Denied (publickey). Fatal: The remote end hung unexpectedly.
So I ran: ssh-keygen -t rsa
to generate a local key. That did not resolve it.
Anyone know why this is not working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将公钥上传到 GitHub 上的您的帐户,以便他们知道是您而不是某个随机的人。密钥位于主目录的
.ssh
文件夹中。请参阅此页面上的“将密钥添加到您的 GitHub 帐户”。
You have to upload your public key to your account on GitHub so they know that it's you and not some random person. The key is located in the
.ssh
folder of your home directory.See "Adding the key to your GitHub account" on this page.