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

前端 未结 20 2194
遇见更好的自我
遇见更好的自我 2020-12-02 04:42

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://gi         


        
相关标签:
20条回答
  • 2020-12-02 05:30

    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.

    0 讨论(0)
  • 2020-12-02 05:30

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

    0 讨论(0)
提交回复
热议问题