[英]Change git .ssh credential location
我正在嘗試從我的 bitbucket 存儲庫中提取存儲庫。 但是,當我這樣做時,出現以下錯誤。
Could not create directory '/f/.ssh' (No such file or directory).
Failed to add the host to the list of known hosts (/f/.ssh/known_hosts)
我看到 git 正在嘗試訪問我的 /f/ 驅動器,但是因為它是一個網絡驅動器,所以內容可能會改變。 我有一個 /c/ 驅動器,其中有一個 .ssh 文件夾,但我無法讓 git 識別該驅動器,而不是默認為 /f/ 驅動器。
我在我的 C 驅動器中運行 git bash。 我嘗試在斷開 /f/ 驅動器連接的情況下重新安裝 git。 如何讓 git 查看我的users/ssh
文件夾?
檢查您的環境變量 ( set
),以防 GIt_SSH 或 GIT_SSH_COMMAND 指示/f/...
中的私鑰。
同樣,從您的本地存儲庫文件夾中檢查 output 的git config -l --show-scope --show-origin
是否與 SSH 相關。
這些是兩個設置來源,可以解釋為什么 Git 不使用$HOME/.ssh
進行其 SSH 操作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.