本文翻译自:git: fatal: I don't handle protocol 'http'
I copy and pasted an git clone command from a web page: https://fedorahosted.org/ibus-typing-booster/ 我从网页上复制并粘贴了一个git clone命令: https : //fedorahosted.org/ibus-typing-booster/
I got this: 我懂了:
user@host> git clone http://git.fedorahosted.org/git/ibus-typing-booster.git
Cloning into 'ibus-typing-booster'...
fatal: I don't handle protocol 'http'
#1楼
参考:https://stackoom.com/question/23rnL/git-致命-我不处理协议-http
#2楼
I copied and pasted the whole line git clone http://...
. 我复制并粘贴了整行git clone http://...
The character between git clone
and http://...
looks like a space, but it is a special Unicode character ! git clone
和http://...
之间的字符看起来像一个空格,但它是一个特殊的Unicode字符 !
Short answer: After removing this character, and entering a real space, it worked! 简短的回答:删除这个角色,并进入一个真实的空间,它的工作!
For people who love details: I see two ways to reveal ascii vs special-unicode-characters 对于喜欢细节的人:我看到两种方式来揭示ascii vs special-unicode-characters
Way1: Python 方式1:Python
Here is the real line: 这是真正的路线:
vi t.txt # copy+paste the line
python
open('t.txt').read()
git clone \xe2\x80\x8b\xe2\x80\x8bhttp://...
Way2: less Way2:少了
vi t.txt # copy+paste the line
LESSCHARSET=ascii less vi.txt
If it looks like git clone <E2><80><8B><E2><80><8B>http://
, then you copy+pasted special-unicode-characters. 如果它看起来像git clone <E2><80><8B><E2><80><8B>http://
,则复制+粘贴的特殊unicode字符。
#3楼
Summary: Type the url instead of copy pasting it in the commandline. 摘要:键入URL而不是在命令行中粘贴它。 It worked for me. 它对我有用。
#4楼
You can also use a text editor: 您还可以使用文本编辑器:
- Paste the URL in the text editor 将URL粘贴到文本编辑器中
- Copy the URL that was just pasted from the text editor 复制刚刚从文本编辑器粘贴的URL
- Paste it in the command line 将其粘贴到命令行中
#5楼
Use backspace to delete whatever there is between git clone
and the url
and then use spacebar to add a clean space between them. 使用退格键删除git clone
和url
,然后使用空格键在它们之间添加一个干净的空格。 Simple as that. 就那么简单。
#6楼
I used double quotes for the URL and it worked. 我使用双引号作为URL并且它起作用。 So something like 所以像
git clone "http://git.fedorahosted.org/git/ibus-typing-booster.git"
works.. single quotes dont help. 工作..单引号不帮助。 It has to be double quotes. 它必须是双引号。