升级到 TortoiseGit v1.8.15.0 和 Git v2.5.0 后找不到主机 [英] After the upgrade to TortoiseGit v1.8.15.0 and Git v2.5.0 hosts cannot be found

查看:83
本文介绍了升级到 TortoiseGit v1.8.15.0 和 Git v2.5.0 后找不到主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将 TortoiseGit 从 v1.7.* 更新到 v1.8.15.0 并将 Git 从 1.* 更新到v2.5.0.windows.1.现在尝试执行像 pull 这样的远程操作时出现错误:

I've just updated my TortoiseGit from v1.7.* to v1.8.15.0 and Git from 1.* to v2.5.0.windows.1. Now trying to perform a remote operation like pull I'm getting errors:

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

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

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

Unable to open connection: Host does not existfatal: Could not read from remote repository.

请确保您拥有正确的访问权限和存储库存在.

Please make sure you have the correct access rights and the repository exists.

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

git did not exit cleanly (exit code 1) (1747 ms @ 19.08.2015 18:43:33)

我将 SSH 客户端 设置从 TortoiseGitPlink 更改为 PuTTY.效果不佳,但 PuTTY 错误 提供了以下信息:

I changed the SSH client setting from TortoiseGitPlink to PuTTY. It didn't work as well, but the PuTTY Error provided following information:

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

Unuble to open connection to github.com-foo

主机不存在

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

I work with aliases and my ~/.ssh/config looks like this:

#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

这在升级前有效,并且在 msys 中仍然有效.

That worked before the upgrade and is still working in msys.

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

TortoiseGit seems to ignore the config. How to make TortoiseGit respect the config again?

推荐答案

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

PuTTY and TortoiseGitPlink do not respect .ssh/config (as described in e.g. Multiple GitHub Accounts & SSH Config or https://gist.github.com/jexchan/2351996). Both tools store, like Windows tools, their configuration in registry.

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

For using PuTTY in your scenario, please see the TortoiseGit Manual - Tips and tricks for SSH/PuTTY.

PS: .ssh/config 是 OpenSSH 的配置文件.如果要使用 OpenSSH,请在 TortoiseGit 网络设置中将 ssh 客户端设置为 ssh.exe(无需使用 ssh.exe 的完整路径,因为它是在 %PATH% 上):

PS: .ssh/config is the config file for OpenSSH. If you want to use OpenSSH, set the ssh client to ssh.exe in TortoiseGit network settings (there is no need to use the full path to ssh.exe as it is on the %PATH%):

这篇关于升级到 TortoiseGit v1.8.15.0 和 Git v2.5.0 后找不到主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆