git: fatal: I don't handle protocol '​​htt

2019-01-10 00:11发布

I copy and pasted an git clone command from a web page: 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'

16条回答
We Are One
2楼-- · 2019-01-10 00:41

Use backspace to delete whatever there is between git clone and the url and then use spacebar to add a clean space between them. Simple as that.

查看更多
Animai°情兽
3楼-- · 2019-01-10 00:43

I copied and pasted the whole line git clone http://....

The character between git clone and http://... looks like a space, but it is a special Unicode character!

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

Way1: 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

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.

查看更多
Root(大扎)
4楼-- · 2019-01-10 00:43

in visual studio code option git:clone i tried every thing e.g putting 5 backspace, deleting the special Unicode character! and putting space nothing works for me

solution works for me

simply open git bash and paste the whole git clone url and done,

it seems there is some issue with visual studio code

查看更多
贼婆χ
5楼-- · 2019-01-10 00:44

I used double quotes for the URL and it worked. 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.

查看更多
神经病院院长
6楼-- · 2019-01-10 00:46

Please Check URL you have pasted and It takes additional h after clone.

So either you have paste full git clone http://<URL>.git or just remove additional letter before git repository URL.

查看更多
欢心
7楼-- · 2019-01-10 00:50

Please do not copy from the clipboard . Just copy the url from your browser's location / Address bar .enter image description here

查看更多
登录 后发表回答