windows - Windows 的 Git SSH 客户端和 .ssh/config 文件的错误路径

标签 windows git ssh

我安装了 Git-1.7.9-preview20120201.exe,当我尝试通过 SSH 访问我的存储库时失败了。

我调查后发现,如果我运行 SSH -T git@myrepo.com,SSH 不会加载定义了自定义端口的 ~/.ssh/config。

当我尝试 SSH -F c:\users\tomas\.ssh\config git@myrepo.com 时一切正常。

我使用了 Process Monitor,发现 SSH 正在尝试在此处查找 \\\\.ssh\config C:\Windows\CSC\v2.0.6\namespace\.ssh.

为什么?

如何强制它使用正常路径? %HOMEPATH%\.ssh\config?

最佳答案

HOME 环境变量设置为 %USERPROFILE% 以便 ssh 获取它。对于在 Windows 上运行的许多 unix 解决方案,这通常似乎是个问题。

快速访问设置用户环境变量:

开始 > 输入“env”> 选择“您帐户的环境变量”

关于windows - Windows 的 Git SSH 客户端和 .ssh/config 文件的错误路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9513712/

相关文章:

windows - postgres COPY (...) TO PROGRAM on Windows 给出错误

c# - 允许用户删除我的应用程序正在使用的文件?

git - “git apply”失败,代码为 1 : patch does not apply error in SourceTree on Stage Hunk

git - 在子模块中使用 .gitattributes 作为 merge 策略

macos - 无法从 osx SSH 到 ubuntu 液滴

git - Mac : SSH doesn't work anymore without changing something

windows - 无法写入文件错误 - ADODB.stream

c++ - audiodg.exe 随着我调用的每个 Beep() 函数不断增长。系统不释放内存

git - 使用SmartGit解决git文件冲突 : ours vs theirs

date - 由于纪元日期时间检索错误,CPU 使用率较高,fail2ban 的 CPU 使用率高达 130%