即使通过 PuTTY 连接到 Windows 上的 GitHub 时也出现问题

发布于 2024-10-10 13:20:24 字数 430 浏览 5 评论 0原文

我知道已经在各个地方(Stack Overflow 内外)讨论了这个问题,但我还没有找到一致有效的解决方案。现在,我正在尝试通过 putty 连接到 github。

我正在连接到 github.com,加载我的私钥,并获得

登录身份:

提示。当我按回车键时,我收到常见的“已断开连接:没有可用的受支持的身份验证方法”错误消息。我正在传递正确的私钥! (我已经在另一台计算机上测试了该密钥并且它有效)。我尝试过有或没有选美(并确保密钥已加载到那里)。您建议我如何继续?

编辑 - 我在推送到 github 时遇到的问题似乎在我的一个存储库中表现出来,但在另一个存储库中却没有。如何检查或修复损坏的存储库? (它似乎没有以任何其他方式损坏,我只是无法从中推出任何东西)。两者都使用相同的密钥。

I know there's already discussion of this problem in various places (in and out of Stack Overflow), but I haven't found a solution that works consistently. Right now, I'm trying to connect to github via putty.

I'm connecting to github.com, loading my private key, and getting a

login as:

prompt. When I hit enter, I get the usual "Disconnected: No supported authentication methods available" error message. I am passing along the correct private key! (I've tested this key from another computer and it works). I've tried with and without pageant (and made sure the key is loaded there). How do you recommend I proceed?

Edit - The problems I'm experiencing pushing to github seem to manifest themselves in one of my repositories, but not the other. How can I check or fix the damaged repository? (It doesn't appear damaged in any other way, I just can't push anything from it). Both use the same key.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

呆° 2024-10-17 13:20:24

这就是我的答案:

http://false.ekta。 is/2010/05/putty-pageant-git-and-github-key-problems/

  1. 在安装 msysgit 时,您确实想要使用 plink 进行 ssh。
  2. 您保存的 Putty 公钥的格式不适合粘贴到 github 中。
  3. 再次启动 puttygen,但选择加载现有密钥副本
  4. 并从那里粘贴到 github 中。

不要尝试打开保存的公钥、删除注释行以及在前面添加 ssh-rsa 等类似操作。这是行不通的。

This was the answer for me:

http://false.ekta.is/2010/05/putty-pageant-git-and-github-key-problems/

  1. You DO want to use plink for ssh when you’re installing msysgit.
  2. Putty’s public key that you have saved isn’t in the right format for pasting into github.
  3. fire up puttygen again, but choose to LOAD AN EXISTING KEY
  4. copy and paste from there into github.

Do not try things like opening up your saved public key, removing the comment lines, and adding ssh-rsa to the front or things like that. It won’t work.

别再吹冷风 2024-10-17 13:20:24

嗯,这并没有真正回答我原来的问题(连接 PuTTY),但我确实发现了存储库的问题是什么。

我为存储库使用了 HTTPS URL。当我切换到“[email protected]之类的网址时:ripper234/Basic。 git”,它完美地工作了。

Well, this doesn't really answer my original question (Connecting with PuTTY), but I did find out what the problem with the repository was.

I was using an HTTPS URL for the repo. When I switched to URLs like "[email protected]:ripper234/Basic.git", it worked flawlessly.

冷血 2024-10-17 13:20:24

如果您在 Windows 上运行,则完全跳过 ssh 键。

使用位于以下位置的 github 插件: windows.github.com

安装插件(右上角“下载”)
安装后,您只需登录即可。
然后,当您需要克隆时,只需单击 github 网页中的“克隆到 Windows”按钮即可。

If you are running on windows then skip the keys ssh keys altogether.

Use the github plugin found at: windows.github.com

Install the plugin (top right "download")
When it's installed you just need to login.
Then when ever you need to clone simply click on the "clone to windows" button found in the github webpages.

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