Linux git clone 期间“无法找到‘https’的远程助手”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8329485/
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
"Unable to find remote helper for 'https'" during git clone
提问by Ben K
I am unable to clone HTTPS repositories. I can clone SSH repos fine, but not HTTPS repos. I cannot test the GIT protocol since I am behind a corporate firewall.
我无法克隆 HTTPS 存储库。我可以很好地克隆 SSH 存储库,但不能克隆 HTTPS 存储库。我无法测试 GIT 协议,因为我在公司防火墙后面。
This is what I am trying to do:
这就是我想要做的:
$ git clone https://github.com/nvie/gitflow.git
Cloning into gitflow...
fatal: Unable to find remote helper for 'https'
I have so far tried the following (based on Google searches)
到目前为止,我已经尝试了以下(基于 Google 搜索)
- Purging and installing Git through
apt-get
- Installing
build-deps
for Git throughapt-get
- Installing curl dev libraries
- Installing expat libraries
- Downloading Git source and building using:
./configure --prefix=/usr --with-curl --with-expat
- Also tried pointing configure at curl binary (
./configure --prefix=/usr --with-curl=/usr/bin/curl
)
- 通过清除和安装 Git
apt-get
build-deps
通过 Git安装apt-get
- 安装 curl 开发库
- 安装 expat 库
- 下载 Git 源代码并使用以下方法构建:
./configure --prefix=/usr --with-curl --with-expat
- 还尝试将配置指向 curl 二进制 (
./configure --prefix=/usr --with-curl=/usr/bin/curl
)
I have tried everything I can find on the internet with no luck. Can anyone help me?
我已经尝试了所有可以在互联网上找到的东西,但都没有运气。谁能帮我?
Git version = 1.7.6.4
Git 版本 = 1.7.6.4
OS = Ubuntu 11.04
操作系统 = Ubuntu 11.04
采纳答案by TastyCode
It looks like not having (lib)curl-devel installed when you compile git can cause this.
看起来在编译 git 时没有安装 (lib)curl-devel 会导致这种情况。
If you install (lib)curl-devel, and then rebuild/install git, this should solve the problem:
如果您安装 (lib)curl-devel,然后重建/安装 git,这应该可以解决问题:
$ yum install curl-devel
$ # cd to wherever the source for git is
$ cd /usr/local/src/git-1.7.9
$ ./configure
$ make
$ make install
This worked for me on Centos 6.3.
这在 Centos 6.3 上对我有用。
If you don't have yum, you can download the source to curl-devel here:
如果你没有 yum,你可以在这里下载 curl-devel 的源代码:
If you are running Ubuntu instead:
如果您正在运行 Ubuntu:
sudo apt-get install libcurl4-openssl-dev
回答by Thillai Narayanan
If you are trying to clone then you could use the git transport
如果您正在尝试克隆,那么您可以使用 git 传输
For example: git clone git://github.com/fog/fog.git
例如: git clone git://github.com/fog/fog.git
Vaio ~/Myworks/Hero $ git clone git://github.com/fog/fog.git
Initialized empty Git repository in /home/nthillaiarasu/Myworks/Hero/fog/.git/
remote: Counting objects: 41138, done.
remote: Compressing objects: 100% (13176/13176), done.
remote: Total 41138 (delta 27218), reused 40493 (delta 26708)
Receiving objects: 100% (41138/41138), 5.22 MiB | 58 KiB/s, done.
Resolving deltas: 100% (27218/27218), done
回答by thehuyvb
I had same problem and simple to resolve it.
我有同样的问题,很容易解决。
Just uninstall git and re-install it.
只需卸载 git 并重新安装它。
#apt-get remove --purge git-svn git-core
#rm /usr/local/bin/git
#apt-get install git-svn git-core
and everything works well.
一切正常。
Hope this help.
希望这有帮助。
回答by ron
On CentOS 5.x, installing curl-devel fixed the problem for me.
在 CentOS 5.x 上,安装 curl-devel 为我解决了这个问题。
回答by cecheverria
I used "git://
" instead of "https://
" and that solved the problem. My final command was:
我用“ git://
”代替“ https://
”解决了这个问题。我的最终命令是:
git clone --recursive git://github.com/ceph/ceph.git
回答by user1164594
I had a lot of problems with this remote helper issue. I ensured that I had installed all the expat, curl etc. but finally resolved it by updating gcc after finding that version 4.4.4 was duff. Just did a yum update and recompiled with 4.4.6.
我在这个远程助手问题上遇到了很多问题。我确保我已经安装了所有的 expat、curl 等,但最终在发现 4.4.4 版本是 duff 后通过更新 gcc 解决了它。刚刚做了一个 yum 更新并用 4.4.6 重新编译。
回答by Metralha
I was having this issue when using capistrano to deploy a rails app. The problem was that my user only had a jailed shell access in cpanel. Changing it to normal shell access fixed my problem.
我在使用 capistrano 部署 Rails 应用程序时遇到了这个问题。问题是我的用户在 cpanel 中只有一个被监禁的 shell 访问。将其更改为正常的 shell 访问解决了我的问题。
回答by Wen Bian
I got the same problem today: git http broken after years of happy service. It seems caused by some Perl lib updates. Tried some sane suggestions on web, none worked. Had enough, I just removed all git stuff, got a new tarball from http://git-scm.com/, compiled and installed, and all things are back to normal. Give it try, or you can go dig deep into your logs...
我今天遇到了同样的问题:经过多年的愉快服务,git http 坏了。这似乎是由一些 Perl 库更新引起的。在网上尝试了一些理智的建议,没有一个奏效。受够了,我只是删除了所有 git 内容,从http://git-scm.com/ 获取了一个新的 tarball ,编译并安装,一切都恢复正常。尝试一下,或者你可以深入挖掘你的日志......
回答by Jarle Drivenes
I had to add a couple of extra installs running CentOS release 5.10 (Final):
我必须添加几个运行 CentOS 5.10 版(最终版)的额外安装:
yum install openssl097a.x86_64
yum install openssl-perl.x86_64
Using git-1.8.5: ./configure make clean make make install
使用 git-1.8.5: ./configure make clean make make install
git clone https://github.com/michaelficarra/CoffeeScriptRedux.git
Cloning into 'CoffeeScriptRedux'...
remote: Reusing existing pack: 4577, done.
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 4601 (delta 13), reused 11 (delta 1)
Receiving objects: 100% (4601/4601), 2.60 MiB | 126.00 KiB/s, done.
Resolving deltas: 100% (2654/2654), done.
Checking connectivity... done.
回答by Nick Woodhams
On Mac OS X 10.9 Mavericks, the solution that worked is as follows
在 Mac OS X 10.9 Mavericks 上,有效的解决方案如下
rvm pkg install openssl
CC=/usr/local/bin/gcc-4.2 CPP=/usr/local/bin/cpp-4.2 CXX=/usr/local/bin/g++-4.2 rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr
This is to compile Ruby with OpenSSL Support. Next, uninstall all the old versions.
这是为了使用 OpenSSL 支持编译 Ruby。接下来,卸载所有旧版本。
brew uninstall openssl
brew uninstall curl
brew uninstall git
Next, install the updated versions. The git installation is dependent on an updated version of CURL.
接下来,安装更新的版本。git 安装依赖于 CURL 的更新版本。
brew install openssl
brew install curl
brew install git