After the upgrade to TortoiseGit v1.8.15.0 and Git v2.5.0 hosts cannot be found

旧时模样 提交于 2019-12-17 21:00:21

问题


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"

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 did not exit cleanly (exit code 1) (1747 ms @ 19.08.2015 18:43:33)

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

Unuble to open connection to github.com-foo

Host does not exist

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

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

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


回答1:


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.

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

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%):



来源:https://stackoverflow.com/questions/32101408/after-the-upgrade-to-tortoisegit-v1-8-15-0-and-git-v2-5-0-hosts-cannot-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!