GitHub-推送时权限被拒绝

发布于 2024-12-20 15:19:35 字数 579 浏览 1 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_失温 2024-12-27 15:19:35

ssh -T [电子邮件受保护]

我可以收到

“嗨 SKSC!您已成功通过身份验证,但 GitHub 未成功
提供 shell 访问。”

此公钥设置步骤用于命令行访问。

使用 GitHub For Mac,您需要在 Mac 菜单的首选项中输入您的电子邮件和密码来设置您的帐户它会自动在您的帐户中添加公钥

您也可以检查 https://github.com/account/ssh 如果 GitHub for Mac 设置正确,您可以看到。名为 GitHub for Mac - your-computer-name

我认为您可以克隆,因为 github 是公开的,可用于每个人的克隆,因此 GitHub for Mac 未配置。可能是正确的。

ssh -T [email protected]

and I can receive

"Hi SKSC! You've successfully authenticated, but GitHub does not
provide shell access."

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 account

Also 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文