我无法克隆HTTPS存储库。我可以克隆SSH回购很好,但不是HTTPS回购。我无法测试GIT协议,因为我位于公司防火墙后面。

这就是我要做的:

$ git clone https://github.com/nvie/gitflow.git
Cloning into gitflow...
fatal: Unable to find remote helper for 'https'

到目前为止,我尝试了以下(基于谷歌搜索)

通过apt-get清洗和安装Git 通过apt-get为Git安装build-deps 安装curl开发库 安装外派库 下载Git源代码并使用以下方法构建: ./configure——prefix=/usr——with-curl——with-expat 还尝试在curl binary(。——prefix=/usr——with-curl=/usr/bin/curl)

我已经试遍了我在网上能找到的所有东西,但都没有成功。有人能帮帮我吗?

转到版本 = 1.7.6.4

操作系统 = Ubuntu 11.04


当前回答

CentOS Minimal通常通过yum install git命令安装1.8版git。

最好的方法是从源代码构建和安装它。当前版本为2.18.0。

Download the source code from https://mirrors.edge.kernel.org/pub/software/scm/git/ or curl -o git-2.18.0.tar.gz https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz Unzip by tar -zxf git-2.18.0.tar.gz && cd git-2.18.0 Install the dependency package by executing yum install autoconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto openjade perl* texinfo Install docbook2X, it's not in the rpm repository. Download and install by $ curl -o docbook2X-0.8.8-17.el7.x86_64.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/d/docbook2X-0.8.8-17.el7.x86_64.rpm $ rpm -Uvh docbook2X-0.8.8-17.el7.x86_64.rpm

并创建一个unix链接名:

ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

编译和安装,参考https://git-scm.com/book/en/v2/Getting-Started-Installing-Git $ make configure $ ./configure——prefix=/usr $ make所有的文档信息 make install install-doc install-html install-info 重新启动服务器(如果没有,您可能会遇到无法找到“https”的远程帮助错误) $ reboot 测试: $ git克隆https://github.com/volnet/v-labs.git $ CD v-labs $ touch test.txt $ git添加。 $ git commit -m test git install $ git push -u

其他回答

解决这个问题最简单的方法是确保git-core被添加到当前用户的路径中

如果您将以下内容添加到~/中的bash配置文件中。Bash_profile通常可以解决这个问题

PATH=$PATH:/usr/libexec/git-core

我今天遇到了同样的问题:git http在多年的快乐服务后崩溃了。它似乎是由一些Perl库更新引起的。在网上尝试了一些明智的建议,没有一个有效。受够了,我只是删除了所有git的东西,从http://git-scm.com/获得了一个新的tarball,编译和安装,一切恢复正常。试一试,或者你可以深入挖掘你的日志…

在CentOS 5上。X,安装curl-devel为我解决了这个问题。

我有完全相同的问题,它归结为一个未满足的依赖,然而,我尝试了公认的答案的解决方案,它没有工作。

最后对我有用的是安装以下所有软件(这是RedHat):

sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

之后,我运行了其他命令,它工作:

./configure
make
sudo make prefix=/usr/local install

我直接从Git的网站上获取了依赖项列表。显然我应该从这里开始:/

CentOS Minimal通常通过yum install git命令安装1.8版git。

最好的方法是从源代码构建和安装它。当前版本为2.18.0。

Download the source code from https://mirrors.edge.kernel.org/pub/software/scm/git/ or curl -o git-2.18.0.tar.gz https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz Unzip by tar -zxf git-2.18.0.tar.gz && cd git-2.18.0 Install the dependency package by executing yum install autoconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto openjade perl* texinfo Install docbook2X, it's not in the rpm repository. Download and install by $ curl -o docbook2X-0.8.8-17.el7.x86_64.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/d/docbook2X-0.8.8-17.el7.x86_64.rpm $ rpm -Uvh docbook2X-0.8.8-17.el7.x86_64.rpm

并创建一个unix链接名:

ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

编译和安装,参考https://git-scm.com/book/en/v2/Getting-Started-Installing-Git $ make configure $ ./configure——prefix=/usr $ make所有的文档信息 make install install-doc install-html install-info 重新启动服务器(如果没有,您可能会遇到无法找到“https”的远程帮助错误) $ reboot 测试: $ git克隆https://github.com/volnet/v-labs.git $ CD v-labs $ touch test.txt $ git添加。 $ git commit -m test git install $ git push -u