即使通过 PuTTY 连接到 Windows 上的 GitHub 也出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4601592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Problem connecting to GitHub on Windows, even via PuTTY
提问by ripper234
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.
我知道已经在各个地方(在 Stack Overflow 内外)讨论过这个问题,但我还没有找到一个始终如一的解决方案。现在,我正在尝试通过 putty 连接到 github。
I'm connecting to github.com, loading my private key, and getting a
我正在连接到 github.com,加载我的私钥,并获得一个
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?
迅速的。当我按 Enter 键时,我收到通常的“已断开连接:没有可用的支持的身份验证方法”错误消息。我正在传递正确的私钥!(我已经在另一台计算机上测试了这个密钥并且它可以工作)。我试过有和没有选美(并确保在那里加载了密钥)。你如何建议我继续?
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.
编辑- 我在推送到 github 时遇到的问题似乎出现在我的一个存储库中,而不是另一个。如何检查或修复损坏的存储库?(它看起来没有以任何其他方式损坏,我只是无法从中推动任何东西)。两者都使用相同的密钥。
采纳答案by ripper234
Well, this doesn't really answer my original question (Connecting with PuTTY), but I did find out what the problem with the repository was.
好吧,这并没有真正回答我最初的问题(与 PuTTY 连接),但我确实发现了存储库的问题所在。
I was using an HTTPS URL for the repo. When I switched to URLs like "[email protected]:ripper234/Basic.git", it worked flawlessly.
我为 repo 使用了 HTTPS URL。当我切换到像“[email protected]:ripper234/Basic.git”这样的 URL 时,它完美地工作。
回答by Wayne Bloss
This was the answer for me:
这是我的答案:
http://false.ekta.is/2010/05/putty-pageant-git-and-github-key-problems/
http://false.ekta.is/2010/05/putty-pageant-git-and-github-key-problems/
- You DOwant to use plink for ssh when you're installing msysgit.
- Putty's public key that you have saved isn't in the right format for pasting into github.
- fire up puttygen again, but choose to LOAD AN EXISTING KEY
- copy and paste from thereinto github.
- 你不要想用砰砰对SSH当您安装msysgit。
- 您保存的 Putty 公钥格式不正确,无法粘贴到 github 中。
- 再次启动 puttygen,但选择加载现有密钥
- 从那里复制并粘贴到 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.
不要尝试打开保存的公钥、删除注释行、添加ssh-rsa
到前面或类似的事情。它不会工作。
回答by Choco Smith
If you are running on windows then skip the keys ssh keys altogether.
如果您在 Windows 上运行,则完全跳过密钥 ssh 密钥。
Use the github plugin found at: windows.github.com
使用在以下位置找到的 github 插件: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.
安装插件(右上角“下载”) 安装后,您只需要登录即可。然后,当您需要克隆时,只需单击 github 网页中的“克隆到 Windows”按钮即可。