Windows Git Bash无法解析%userprofile%

Windows Git Bash无法解析%userprofile%,windows,git,git-bash,Windows,Git,Git Bash,我使用的是Windows8.1Pro和Git2.7.1.Windows.2 我的问题不言自明: xehpuk@XEHPUK MINGW64 /d/the-next-big-thing (develop) $ git pull Could not create directory '/%userprofile%/.ssh'. percent_expand: unknown key %/ fatal: Could not read from remote repository. Please ma

我使用的是Windows8.1Pro和Git2.7.1.Windows.2

我的问题不言自明:

xehpuk@XEHPUK MINGW64 /d/the-next-big-thing (develop)
$ git pull
Could not create directory '/%userprofile%/.ssh'.
percent_expand: unknown key %/
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

xehpuk@XEHPUK MINGW64 /d/the-next-big-thing (develop)
$ cd ~
bash: cd: /%userprofile%: No such file or directory

xehpuk@XEHPUK MINGW64 /d/the-next-big-thing (develop)
$ echo $USERPROFILE
C:\Users\xehpuk
这在几天前起作用了,我不记得在系统上做过任何更改

显然,如果这很重要的话,我是Git初学者和Windows的主要用户



我通过将用户环境变量
GIT\u SSH\u COMMAND
设置为
“/c/Program Files/GIT/usr/bin/SSH.exe”-I/c/Users/xehpuk/.SSH/id\u rsa
解决了这个问题,问题非常简单:

您只需在windows的系统属性下设置一个HOME变量,并将HOME设置为本地用户配置文件文件夹