On a fresh git install, when setting the keys and everything using tortoise git the repositories are cloned correctly. also the pull and push command works without problems.
However, when opening a command line to do the same thing, running git pull (from a cmd, power shell or mingw) throws an error similar to the following. The error is in the lack of access to the folder
The folder is created in the required path (c:\users\u40497.ssh) however it is not recognized as valid.
The permissions are correct and the windows are open as administrators. The keys are correct, because from tortoise they work. The HOME and HOMEPATH environment variables point to the correct paths.
What could be happening that does not recognize that folder as valid?
For some reason your git installation is looking for the folder
.ssh
inside the/home/u40497
.You can do a little trick... if you're using git for windows , the root you see
mingw
is inC:\Program Files\Git
. What we are going to do is create the folder/home
that git is looking for.On Windows:
C:\Program Files\Git\home
Everyone
can write to itOpen
mingw
and create the folder you are looking for with this command:And ready! If you have private keys that you need git to use, you'll need to copy them to
C:\Program Files\Git\home\u40497\.ssh
.Another option would be to teach git where your home is. It sounds much more difficult than it really is.