GitHub-推送时权限被拒绝
我是 github 的新手,在将存储库推送到 github 时遇到一些麻烦。我正在研究 Mac Lion。我按照所有步骤设置公钥和私钥对。
然后我运行
ssh -T [email protected]
,我可以收到
"Hi SKSC! You've successfully authenticated, but GitHub does not provide shell access."
到目前为止,一切似乎都正确
然后我启动了 Mac 版 GitHub.app,然后转到 My Repository/RepositoryName/Branches 并单击 公共按钮。我收到“权限被拒绝(公共密钥)”错误。
但是,我可以将存储库克隆到计算机,没有任何错误。
有人知道如何解决这个问题吗?
I am new to github and I have some troubles when pushing repository to github. I am working on Mac Lion. I followed all steps to set up public and private key pair.
Then I ran
ssh -T [email protected]
and I can receive
"Hi SKSC! You've successfully authenticated, but GitHub does not provide shell access."
Till now, everything seems correct
Then I launched GitHub.app
for Mac and then went to My Repository/RepositoryName/Branches
and click public
button. I got "Permission denied(PublicKey)" error.
However, I can clone repository to computer, no error at all.
Anyone know how to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此公钥设置步骤用于命令行访问。
使用 GitHub For Mac,您需要在 Mac 菜单的
首选项
中输入您的电子邮件和密码来设置您的帐户它会自动在您的帐户中添加公钥您也可以检查 https://github.com/account/ssh 如果 GitHub for Mac 设置正确,您可以看到。名为
GitHub for Mac - your-computer-name
我认为您可以克隆,因为 github 是公开的,可用于每个人的克隆,因此 GitHub for Mac 未配置。可能是正确的。
This public key setup step is for command-line access.
Using GitHub For Mac, you need to setup your account in the
Preferences
in Mac menu by typing in your e-mail and password. It will automatically add public key in your accountAlso you can check https://github.com/account/ssh. If GitHub for Mac is setup correctly, you can see a public key named
GitHub for Mac - your-computer-name
I think you can clone because github is public for cloning for everyone. Pushing needs to verify your credential. So GitHub for Mac didn't get configured correct probably.