git - 在 Windows 7 上使用 unicode 的 msysgit 配置文件文件夹

标签 git encoding utf-8 msysgit

我在 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/

相关文章:

git - 如何获得 `git diff origin/master` 的相反方向

Git 强制恢复到 HEAD~7

git - 无法通过慢速互联网连接推送到 git : ssh could not resolve hostname

javascript - base64 在 python 中编码,在 javascript 中解码

mysql - ASP.NET MVC + MySQL 中的编码问题

django - 从 django 返回一个用 UTF-8 编码的 csv 和 BOM

git - 推送一个重新设置的分支?

flash - Flash 支持 Opus 编解码器吗?

c++ - 在C中使用utf8字符串

php - 复制后编码混淆