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

2019-01-10 00:53发布

问题:

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'

回答1:

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.



回答2:

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.



回答3:

I simply added 5 "SPACE"s between clone and the url:

  git clone     ​https://<PATH>/<TO>/<GIT_REPO>.git

and it works!



回答4:

Summary: Type the url instead of copy pasting it in the commandline. It worked for me.



回答5:

Mostly it is due to some invisible unicode characters which can come if you hit "Ctrl+V" or "Ctrl+Shift+V" in the terminal. Don't copy and paste the whole command. Instead , type git clone and then copy and paste the url using Right Click + Paste.



回答6:

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.



回答7:

You can also use a text editor:

  • Paste the URL in the text editor
  • Copy the URL that was just pasted from the text editor
  • Paste it in the command line


回答8:

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



回答9:

The same issue happened with me when I have just copied the url into the clipboard and then pasted it into the terminal. Rewriting whole the line without copy-past option resolved my issue.



回答10:

This just happened to us without any whitespace issues, and changing https: to http: fixed it...



回答11:

clonning below :

git clone https://github.com/zendframework/ZendSkeletonApplication.git

gives error:

Cloning into 'ZendSkeletonApplication'...
fatal: I don't handle protocol 'https'

Modified it to:

git clone https://github.com/zendframework/ZendSkeletonApplication

works perfectly or you can just git clone the url. I am using os windows 10 and gitbash.



回答12:

if you are using windows use 'url' speech marks to open and close your url eg git clone 'your-url-here'



回答13:

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.



回答14:

I was trying it through git explorer's Clone option. And it was giving me this issue.

I pasted it on Git bash CLI, and it worked fine.



回答15:

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



回答16:

Related answer with this question.
Error - fatal: I don't handle protocol 'git clone https'
I was trying to clone git project to my newly installed VScode in my Linux system, i was copied the entire url from bit bucket, which was like

git clone https://abc@bitbucket.org/abcuser/myproject.git


But actually it running command like

git clone git clone https://abc@bitbucket.org/abcuser/myproject.git

in the bit bucket.
So Simply do the following steps :
1. Enter Ctr+p; this will open command box. Enter and open 'Clone'
2. Now only paste the url of your git reposiratory here. eg: https://abc@bitbucket.org/abcuser/myproject.git
3. After that box for enter your git password will appear on screen. Enter your git password here.
4. Done.