Git SSH client for windows and wrong path for .ssh

2019-01-13 04:46发布

I installed Git-1.7.9-preview20120201.exe, and when I try to access my repository via SSH it failed.

I investigated and found that if I run SSH -T git@myrepo.com, SSH doesn't load ~/.ssh/config where a custom port is defined.

When I try SSH -F c:\users\tomas\.ssh\config git@myrepo.com everything is OK.

I used Process Monitor and found that SSH is trying to find \\\\.ssh\config here C:\Windows\CSC\v2.0.6\namespace\.ssh.

Why?

How I can force it to use normal path? %HOMEPATH%\.ssh\config?

标签: windows git ssh
2条回答
Fickle 薄情
2楼-- · 2019-01-13 04:58

set the HOME environment variable pointing to %USERPROFILE% for ssh to pick it up. This usually seems to be the problem for many unix solutions that run on windows.

Fast access to set user env variables:

Start > Type "env" > Select "Environmental variables for your account"

查看更多
劳资没心,怎么记你
3楼-- · 2019-01-13 05:03

I found that windows msygit port store ssh config here <installPath>\Git\etc\ssh\ssh_config

查看更多
登录 后发表回答