我在 Windows 7 上安装了 msysgit,我的配置文件文件夹包含 unicode 字符,看起来像 C:\Users\Андрей
我无法让 ssh 工作,收到这条消息:
>ssh -T git@github.com
Could not create directory '/c/Users/\200\255\244\340\245\251/.ssh'.
.git/gitconfig 有这个字符串:
[core]
quotepath = false
[i18n]
commitencoding = cp1251
logoutputencoding = cp1251
据我所知,这不会影响路径。然后我在 Git/etc/profile 中修补了 $HOME:
export HOME="/d/Dropbox/My\Documents/"
但这并没有改变任何东西。我仍然得到 Could not create directory
for ssh.
它适用于 ssh
设置 HOME=/d/Dropbox/我的文档
从命令行。
但它只适用于 ssh -T git@github.com
而不是 git push
。
最佳答案
我有一个类似但有点不相关的 unicode 字符问题,但这可能对你有帮助。您可能需要设置环境的代码页。您可以尝试使用 chcp 命令更改 Windows 控制台代码页:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chcp.mspx?mfr=true
关于git - 在 Windows 7 上使用 unicode 的 msysgit 配置文件文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8127970/