git TortoiseGit 1.7.8:在“同步”或“拉”时“无法加载此密钥”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10219138/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:47:17  来源:igfitidea点击:

TortoiseGit 1.7.8: "Couldn't load this key" on "sync" or "pull"?

gittortoisegit

提问by davids

When I try to use "Git Sync" and then "Pull" I get the error:

当我尝试使用“Git Sync”然后“Pull”时出现错误:

Couldn't load this key (unable to open file)

无法加载此密钥(无法打开文件)

It then tries to proceed with the pull and I get this error:

然后它尝试继续拉动,我收到此错误:

Disconnected: No supported authentication methods available (server sent: public key)

断开连接:没有可用的受支持的身份验证方法(服务器发送:公钥)

This has happened only since I upgraded to 1.7.8.0. It was all working just fine before. I can successefully pull using gitbash so I know I can connect.

这仅发生在我升级到 1.7.8.0 之后。之前一切正常。我可以使用 gitbash 成功拉取,所以我知道我可以连接。

I am not sure what changed, or what I can do to fix it. Please help!

我不确定发生了什么变化,或者我能做些什么来修复它。请帮忙!

ADDITIONAL STEPS

附加步骤

I went to the the GIT folder and used gitbash to check git remote -v and received:
.puttykeyfile
origin [email protected]:{name}/{repository}.git (fetch)
origin [email protected]:{name}/{repository}.git (push)

我去了GIT文件夹并使用gitbash检查git remote -v并收到:
.puttykeyfile
origin [email protected]:{name}/{repository}.git (fetch)
origin [email protected]:{name} /{repository}.git(推送)

I think that is correct.

我认为这是正确的。

I checked the putty key settings in tortoisegit. I have two entries:

我检查了 tortoisegit 中的腻子键设置。我有两个条目:

  1. .puttykeyfile - which just has .puttykeyfile in Remote
  2. origin - this appears to have all the correct information in Remote, URL and Putty Key
  1. .puttykeyfile - 在 Remote 中只有 .puttykeyfile
  2. origin - 这似乎在 Remote、URL 和 Putty Key 中包含所有正确的信息

When I load the key in PuTTYGen it has the ssh-rsa 1024... key fingerprint.

当我在 PuTTYGen 中加载密钥时,它具有 ssh-rsa 1024... 密钥指纹。

pageant.exe was running, but isn't now, but it still doesn't work

pageant.exe 正在运行,但现在不是,但它仍然不起作用

When it was working before, I had on git folder in the same folder as my key. Now I have 3, but none of them work and it doesn't seem to work if I create a new git folder with a single repository and key. I don't know if it affects the results, but wanted to share that just in case.

在它之前工作时,我在与我的密钥相同的文件夹中拥有 git 文件夹。现在我有 3 个,但它们都不起作用,如果我创建一个带有单个存储库和密钥的新 git 文件夹,它似乎不起作用。我不知道它是否会影响结果,但我想分享一下以防万一。

回答by Jupaol

That happens when you can not authenticate to the remote server, for some reason your keys are not found. You installed a new version of tortoiseGit. Were your keys inside that folder? maybe they were removed when you installed the new version.

当您无法对远程服务器进行身份验证时会发生这种情况,因为某些原因找不到您的密钥。您安装了新版本的 tortoiseGit。你的钥匙在那个文件夹里吗?也许当您安装新版本时它们已被删除。

Check the remotes are configured in your Git repository

检查您的 Git 存储库中是否配置了遥控器

git remote -v

If they are correct, and you still have your keys, try to add them again to the tortoise settings

如果它们是正确的,并且您仍然拥有密钥,请尝试将它们再次添加到乌龟设置中

TortoiseGit Settings - Git - Remote - Putty key

TortoiseGit 设置 - Git - 远程 - Putty 键

If you need help to convert your rsa keys (used to authenticate with) to putty format:

如果您需要帮助将 rsa 密钥(用于验证)转换为腻子格式:

http://www.electrictoolbox.com/putty-rsa-dsa-keys/

http://www.electrictoolbox.com/putty-rsa-dsa-keys/

Also check that pageant.exe is not running (you can check that in the systry), it could be causing problems if the loaded key is not found

还要检查 pageant.exe 是否未运行(您可以在系统中检查),如果未找到加载的密钥,则可能会导致问题

回答by baoshan

That happened when reinstall my system. After I deployed the tortoisGit, it showed me the tips when I used 'Git pull' or other code. erro tips

重新安装系统时发生了这种情况。在我部署了 tortoisGit 之后,它向我展示了我使用“Git pull”或其他代码时的提示。 错误提示

Then I searched this issue, but it did not resole my problem. Fortunately, I recognised that whether it was the problem of the old configuration? So, I opened the 'config' file of my project, deleted the 'puttykeyfile' line.

然后我搜索了这个问题,但它没有解决我的问题。还好我认了是不是老配置的问题?因此,我打开了项目的“配置”文件,删除了“puttykeyfile”行。

...!

……!

Resolved!

解决!

Hoping to help you!

希望能帮到你!

ps: project dictionary -> .git -> config -> puttykeyfile

ps:项目字典 -> .git -> config -> puttykeyfile