我从一个网页上复制并粘贴了一个git克隆命令:https://fedorahosted.org/ibus-typing-booster/
我得到了这个:
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'
我从一个网页上复制并粘贴了一个git克隆命令:https://fedorahosted.org/ibus-typing-booster/
我得到了这个:
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'
当前回答
我使用双引号的URL,它工作。就像这样
git clone "http://git.fedorahosted.org/git/ibus-typing-booster.git"
工作. .单引号没有用。必须是双引号。
其他回答
使用backspace删除git clone和url之间的任何内容,然后使用空格键在两者之间添加一个干净的空格。就这么简单。
如果你使用的是Windows,使用“url”语音标记来打开和关闭你的url Git克隆“your-url-here”
这主要是由于一些不可见的unicode字符,如果你在终端中按“Ctrl+V”或“Ctrl+Shift+V”就会出现。不要复制和粘贴整个命令。 相反,输入git clone,然后使用右键单击+粘贴复制并粘贴url。
摘要:键入url,而不是复制粘贴到命令行中。这对我很管用。
如果你正在使用Git Extensions GUI或GitHub Desktop(意味着如果你正在使用任何UI软件而不是命令行工具)来克隆repo,那么你必须只复制和粘贴URL,即https://..。所以没有必要在URL之前有git克隆,因为软件会自己做。