Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
527 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...