git:致命:我不处理协议‘http‘

本文翻译自: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 clonehttp://...之间的字符看起来像一个空格,但它是一个特殊的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 cloneurl ,然后使用空格键在它们之间添加一个干净的空格。 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. 它必须是双引号。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值