Could not create directory '/c/\\303\\234/.ssh

2019-07-02 05:52发布

问题:

I have created an OpenShift application using rhc. The git repository has been cloned successfully on my Windows 7 PC. I want to push my code changes back to OpenShift. I am using TortoiseGit.

I have used the procedure described here to create and set SSH keys for TortoiseGit. I have modified the settings to configure the SSH private key:

Yet, when I try to push my changes, I get:

What is causing this and how to solve it? Thanks!

回答1:

It looks like git cannot save the known hosts list on c:\ (in c:\.ssh\.known_hosts). Usually the .ssh dir is being created in the $HOME directory. Try setting the HOME environment variable to a directory writable by the current user, i.e. the user's home directory in Windows: c:\Users\<username>.

It depends whether you're using msysgit or installed git through cygwin, etc. Please take a look at https://serverfault.com/questions/194567/how-to-i-tell-git-for-windows-where-to-find-my-private-rsa-key for further information.