Closed
Description
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
64 bit
$ git --version --build-options
git version 2.10.2.windows.1
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [版本 6.1.7601]
Win7 64 Pro
- What options did you set as part of the installation? Or did you choose the defaults?
> type "C:\Program Files\Git\etc\install-options.txt"
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
- Any other interesting things about your environment that might be related to the issue you're seeing?
Suppose 2.10.1 has the same issue.
Study some, and compare the changes between 2.10.0 and 2.10.1, then I guess the changes of url.c in
commit introduce hex2chr() for converting two hexadecimal digits to a character may be the key?
Also see TortoiseGit issue 2859
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
CMD
- What commands did you run to trigger this issue? If you can provide a Minimal, Complete, and Verifiable example this will help us understand the issue.
Can't clone if URL contains Chinese word(s)
$ git.exe clone --progress -v "D:\Temp\i2859\Test中文.git" "D:\Temp\i2859\Test中文2.10.2"
Or add a remote and its URL contains Chinese word(s). Then can't perform fetch/push anymore.
Note: English URL works fine.
- What did you expect to occur after running these commands?
Like Git Bash does:
$ git.exe clone --progress -v "D:\Temp\i2859\Test中文.git" "D:\Temp\i2859\Test中文2.10.2"
Cloning into 'D:\Temp\i2859\Test中文2.10.2'...
done.
- What actually happened instead?
D:\Temp\i2589>git.exe clone --progress -v "D:\Temp\i2589\Test中文.git" "D:\Temp\i2589\Test中文2.10.2"
Cloning into 'D:\Temp\i2589\Test中文2.10.2'...
"git-upload-pack 'D:\Temp\i2589\Test䏿��.git'": git-upload-pack 'D:\Temp\i2589\Test䏿��.git': No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Warning: Your console font probably doesn't support Unicode. If you experience strange characters in the output, consider switching to a TrueType font such as Consolas!
Update 1
TortoiseGit interface shows those two strings normally:
And test with true type in cmd.exe
:
D:\Temp\i2589>git clone "D:\Temp\i2859\Test中文.git" "D:\Temp\i2859\中文2.10.2"
Cloning into 'D:\Temp\i2859\中文2.10.2'...
"git-upload-pack 'D:\Temp\i2859\Test䏿��.git'": git-upload-pack 'D:\Temp\i2859
\Test䏿��.git': No such file or directory
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
That warning is gone.
Update 2
Other testing results: (TortoiseGit calls git.exe)
As you can see:
- 2.10.0 is last good for TortoiseGit
- 2.10.1 is first bad. Bash works fine, but CMD. (based on that TortoiseGit calls git.exe, and the result in my last comment)
Workaround
call set LC_ALL=C
in cmd.exe