Windows 上的 Git:“我不处理协议‘git clone http’”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15908811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git on windows : "I don't handle protocol 'git clone http'"
提问by Manu
I'm trying to install git and tortoisegit on a windows 7 machine (a VM inside windows 8's Hyper V).
我正在尝试在 Windows 7 机器(Windows 8 的 Hyper V 中的虚拟机)上安装 git 和 tortoisegit。
I followed the instruction, but now when I try to clone something I get the error "I don't handle protocol 'git clone http'"
我按照说明进行操作,但是现在当我尝试克隆某些内容时出现错误“我不处理协议 'git clone http'”
Any clues as to what is going on ?
关于发生了什么的任何线索?
回答by manojlds
You are probably entering the command git clone http://repo/url
in the place where it expects only the url, i.e http://repo/url
您可能git clone http://repo/url
在只需要 url 的地方输入命令,即http://repo/url
回答by Davi
git clone
looks for <options>
and then the <repo>
. Normally you can skip the options, but with the latest version of the Windows git bash I've had to add an option for the git clone https...
to work.
git clone
寻找<options>
然后<repo>
. 通常你可以跳过这些选项,但是对于最新版本的 Windows git bash,我不得不添加一个选项git clone https...
才能工作。
If you aren't using options just use git clone -q https....
for the "quiet" option and it should work fine.
如果您不使用选项,请仅git clone -q https....
用于“安静”选项,它应该可以正常工作。
回答by Lucas
Quote the URL. For example,
引用 URL。例如,
git clone "https://github.com/git/git.git"
I only had to do this on Windows using the Git Bash (e.g. MINGW64). If using the Windows cmd.exe
shell, the quotes are not required.
我只需要使用 Git Bash(例如 MINGW64)在 Windows 上执行此操作。如果使用 Windows cmd.exe
shell,则不需要引号。