簡體   English   中英

用於Windows的Git SSH客戶端和.ssh / config文件的錯誤路徑

[英]Git SSH client for windows and wrong path for .ssh/config file

我安裝了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

為ssh設置指向%USERPROFILE%HOME環境變量以獲取它。 這通常似乎是許多在Windows上運行的unix解決方案的問題。

快速訪問設置用戶env變量:

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

我發現windows msygit端口存儲ssh配置在這里<installPath>\\Git\\etc\\ssh\\ssh_config

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM