升级到 TortoiseGit v1.8.15.0 和 Git v2.5.0 后找不到主机

aut*_*tix 2 ssh plink tortoisegit

我刚刚更新了我的 TortoiseGit 从v1.7.*tov1.8.15.0和 Git 从1.* to v2.5.0.windows.1。现在尝试执行远程操作,就像pull我收到错误一样:

git.exe pull -v --progress "origin"

无法打开连接:主机不存在致命:无法从远程存储库读取。

请确保您拥有正确的访问权限并且存储库存在。

git 没有完全退出(退出代码 1)(1747 毫秒 @ 19.08.2015 18:43:33)

我将SSH client设置从更改TortoiseGitPlinkPuTTY。它也不起作用,但PuTTY Error提供了以下信息:

无法打开与 github.com-foo 的连接

主机不存在

我使用别名,~/.ssh/config看起来像这样:

#github.com-foo account
Host github.com-foo
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_foo

#github.com-bar account
Host github.com-bar
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_bar
Run Code Online (Sandbox Code Playgroud)

这在升级之前有效并且仍在msys.

TortoiseGit 似乎忽略了config. 如何让 TortoiseGitconfig再次尊重?

MrT*_*Tux 6

PuTTY 和 TortoiseGitPlink 不尊重.ssh/config(如多个 GitHub 帐户和 SSH 配置https://gist.github.com/jexchan/2351996 中所述)。这两种工具都像 Windows 工具一样将它们的配置存储在注册表中。

如需在您的场景中使用 PuTTY,请参阅 TortoiseGit 手册 - SSH/PuTTY 的提示和技巧

PS:.ssh/config是 OpenSSH 的配置文件。如果你想使用OpenSSH,SSH客户端设置为ssh.exe在TortoiseGit网络设置(也没有必要使用的完整路径ssh.exe,因为它是上%PATH%):