突然收到“没有可用的受支持的身份验证方法”当推送到github时
几周前我开始了一个 github 项目。我能够毫无问题地推送更改(我正在使用 TortoiseGIT)。
今天,当我尝试推送更改时,突然出现“PuTTY 致命错误”“已断开连接:没有可用的受支持的身份验证方法”错误窗口。
您可以建议什么来解决这个问题吗?
I started a github project a few weeks ago. I was able to push changes without any problems (I'm using TortoiseGIT).
Suddenly today when I tried to push my changes, I got "PuTTY Fatal Error" "Disconnected: No supported authentication methods availble" error window.
Anything you can recommend to remedy the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(17)
对我来说,只有在使用 TortoiseGit 时才对远程存储库执行操作时出现问题,通过 CMD / GitBash 根本没有问题。
所以我所做的非常简单:
我打开了TortoiseGit-->设置--> 网络并在 SSH 客户端中我更改为“C:\Program Files\Git\usr\bin\ssh.exe”而不是“TortoiseGitPlink.exe”。
For me there was a problem to perform actions against the remote repository only when using TortoiseGit, through CMD / GitBash there have been no issue at all.
So what I did was Very simple:
I opened TortoiseGit-->Settings --> Network and in SSH Client I changed to "C:\Program Files\Git\usr\bin\ssh.exe" instead of "TortoiseGitPlink.exe".
适用于 Windows 上的 TortoiseGit 用户
(正如我最初在这个问题中发布的那样)
我曾经设置过我的大部分 Github/Bitbucket使用SSH存储库URL的存储库(最初)它曾经是防止TortoiseGit在每个操作中提示输入密码的唯一便捷方法。
但以这种方式设置 TortoiseGit 总是让人头疼。每次我都要花费几个小时才能正确设置,因为默认安装选项似乎从来都不起作用(即使到了 2016 年,天哪!)。
但 TortoiseGit 现在对 HTTPS 有更好的密码管理,并且 Github 实际上建议尽可能使用 HTTPS URL。
HTTPS 的好处是:
pageant.exe
不断运行(每次启动时都会请求您的密码)For TortoiseGit Users on Windows
(as I originally posted in this question)
I used to setup most of my Github/Bitbucket repositories using the SSH repository URLs as (originally) it used to be the only convenient way to prevent TortoiseGit from prompting for your password on every single action.
But setting TortoiseGit up this way was always hair-pullingly painful. Every time it took me hours to set up correctly, as the default installation options never seemed to work (even as of 2016, sheesh!).
But TortoiseGit now has better password management for HTTPS, and Github actually recommends using HTTPS URLs wherever possible.
The benefits of HTTPS are:
pageant.exe
constantly running (which requests your password on each launch)确保您使用 OpenSSH 安装了 TortoiseGit,并且使用了 SSH 身份验证方法。如果您使用 Putty 安装,系统托盘中可能会有一个名为“Putty Pageant”的“计算机符号”。
Make sure you installed TortoiseGit with OpenSSH and that you use the SSH authentication method. If you installed with Putty, there may be a "computer symbol" in the systray called "Putty Pageant".
就我而言,Tortoise Git 丢失了 PuttyKey。
所以我必须去 TortoiseGit settings > git >远程
在本节中,我单击了远程框架我的来源并且PuttyK密钥未设置(之前是)。我不得不重新设置它。
In my case, Tortoise Git lost PuttyKey.
So I had to go to TortoiseGit settings > Git > Remote
and in this section I clicked on Remote frame my origin and PuttyK Key was not set (It was before). I had to set it up again.
为了解决这个问题,我必须从开始菜单手动运行 Pageant:
然后,我在系统托盘中看到 pageant :
我可以添加我的密钥。通常,密钥位于
%userprofile%\.ssh
中。To fix this, I had to manually run Pageant from the start menu:
Afterwards, I saw pageant in the system tray:
I could add my key. Normally, keys are in
%userprofile%\.ssh
.我可以通过将私钥添加到 Pageant 中来修复此错误。我在创建密钥期间忘记执行此操作,添加后我就不再收到错误。
I was able to fix this error by adding the private key into Pageant. I forgot to do this during the key creation, and once I added it I no longer received the error.
我想通了 - 发生这种情况是因为自从开始从事该项目以来我重新安装了 TortoiseGIT。拉取过程很顺利,但是当我尝试推回我的更改时,TortoiseGIT 需要我的身份验证密钥,而该密钥尚未配置。
编辑
为了解决这个问题,我只是清除了 TortoiseGit 中的所有身份验证数据,如下:
上下文菜单“Tortoise Git”->设置->已保存的数据 ->认证数据[清除]
I figured it out - it happened because I reinstalled TortoiseGIT since starting to work on the project. Pulls went smoothly, but as soon as I tried to push back my changes TortoiseGIT needed my authentication key, which was not configured.
Edit
To resolve, I simply cleared all authentication data from my TortoiseGit, under:
Context menu "Tortoise Git" -> Settings -> Saved Data -> Authentication data [Clear]
[WINDOWS] [在 TORTOISE SVN 后安装 GIT(1) 也有同样的问题]
(1)不是TortoiseGit,而是Git开发社区版本。
在 git bash 中:
正在给予
(感谢 Răzvan Flavius Panda 和 Shahar Hamuzim Rajuan,上文)。
我必须在 Windows 系统环境变量 中更改 GIT_SSH 的值
(之前,我尝试在 git bash 中成功键入:
所以我们可以在 C:\Program Files\Git\etc 中添加这一行\bash.bashrc 使更改永久生效。
注意修改C:\Program Files\Git\setup.ini中的GIT_SSH失败)
[WINDOWS] [Same problem with GIT(1) installed after TORTOISE SVN]
(1)not TortoiseGit but the Git development community version.
In git bash :
was giving
(Thanks to Răzvan Flavius Panda and Shahar Hamuzim Rajuan, above).
I had to change the value of GIT_SSH in the Windows system environment variables from
(Before, I tried successfully in git bash to type :
So we could add this line in C:\Program Files\Git\etc\bash.bashrc for the change to be permanent.
Note that modifying GIT_SSH in C:\Program Files\Git\setup.ini fails)
对我来说,我在将 GIT 升级到 2.8.0 后收到此错误。该问题是由于 bash 错误读取 $HOME 目录并默认为 Windows 安装文件夹下的某个系统位置:
/c/Windows/system32/config/systemprofile
。事实证明,需要进行一些环境变量清理。很久以前,我安装了一个版本的 GIT(大约 1.7.x),它在系统环境变量中创建了一个 HOME 变量。由于行为发生一些变化,升级到 2.8.0 后需要将其删除,而不是添加进一步的 HOME 用户环境变量。
For me I was getting this error after upgrading GIT to 2.8.0. The issue was due to the $HOME directory being incorrectly read by bash and defaulting to some system location under the windows installation folder:
/c/Windows/system32/config/systemprofile
.Turns out that a little environment variable cleanup was required. A long while ago I had installed a version of GIT (about 1.7.x) which had created a HOME variable in the system environment variables. This needed to be removed after upgrading to 2.8.0 due to some change in behaviour, rather than adding a further HOME user environment variable.
我更改为
C:\Program Files\Git\usr\bin\ssh.exe
而不是TortoiseGitPlink.exe
并保存。并将其改回TortoiseGitPlink.exe
并解决了此错误。I changed to
C:\Program Files\Git\usr\bin\ssh.exe
instead ofTortoiseGitPlink.exe
and saved. And changed it back toTortoiseGitPlink.exe
and it solved this error.就我而言,当我取消选中并检查 AutoloadPutty 键时,它得到了解决。
In my case, when I unchecked and checked the AutoloadPutty key it got resolved.
请参阅我的帖子。我刚才遇到了这个问题,并尝试了这里发布的所有内容,但无法解决。
最后是与现有 PuTTy 配置相关的完全相同的问题=> [TortoiseSVN 不断询问我的密码
See my post here. I had this problem just now and tried everything posted here but I couldn't solve it.
At the end was this exact same problem related to an existing PuTTy configuration => [TortoiseSVN keeps on asking me for my password
我也遇到了同样的错误,在成功推送到我的存储库几个月后,该错误突然随机发生。就我而言,在 Tortoisegit->Settings->Git->Remote 中,Push URL 字段不知为何是空的。
I had this same error, which randomly occurred out of the blue after having successfully pushed to my repository over many months. In my case, in Tortoisegit->Settings->Git->Remote, the Push URL field was somehow empty.
作为一个新用户,我在创建新项目时使用 GitLab 和 Eclipse 时遇到了同样的错误。作为一名学生,我使用不同的电脑,并且我的钥匙出现了问题,但我认为问题已经解决,因为我创建了一套新的干净设备,而且我的上一个项目运行良好。不幸的是,这个错误在新项目上再次发生。
我发现创建新的 Eclipse 项目默认为我的 ssh 目录,而不是我在当前项目中使用的 .ssh。我最初使用 ssh 目录,但在出现问题后使用新密钥更改为 .ssh 。
在 Window > 中更改为 .ssh首选项>一般>网络连接> SSH2 解决了这个问题。
我发布此消息是因为我花了很多时间寻求有关我的密钥的帮助,但没有找到与我的问题相关的任何内容。
As a new user I had the same error with GitLab and Eclipse when creating new projects. As a student I use different PCs and had issues with my keys but thought it was resolved as I created a new clean set and my last project is working well. Unfortunately the error occurred again on a new project.
I discovered that creating a new Eclipse project defaulted to my ssh directory rather than the .ssh I am using on my current project. I used the ssh directory initially but after issues changed to .ssh with new keys.
Changing to the .ssh in Window > Preferences > General > Network Connections > SSH2 fixed the problem.
I am posting this as I have spent a lot of time looking for help with my keys and have not found anything that related to my problem.
确保克隆时选中“加载腻子密钥”复选框
如果不检查它会给出相同的错误
make sure when cloning that the check box "load putty key" is checked
if not checked it will give the same error
在TortoiseGit中:
Settings > git >远程
In TortoiseGit:
Settings > Git > Remote
对我来说,我必须将“msysgit”版本更新到 1.7.10+ 版本。完成后我没有遇到上述错误。
我认为您可能需要检查是否已安装 msysgit ,如果没有安装它。
For me, I had to update my version of "msysgit" to a 1.7.10+ version. Once done I did not face the above mentioned error.
I think you might need to check if you have installed msysgit and if not there install it.