git:'http-push'不是git命令。致命:git-http-push失败 [英] git: 'http-push' is not a git command. fatal: git-http-push failed

查看:457
本文介绍了git:'http-push'不是git命令。致命:git-http-push失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过https推送到存储库,但收到以下错误:

I am trying to push to a repository over https, but am receiving the following error:

[root@localhost systemevents]# git push
git: 'http-push' is not a git command. See 'git --help'.
fatal: git-http-push failed

我没有检查SSL证书( git config --global http.sslVerify false )。这在Redhat Enterprise Linux 5虚拟机上进行,这是一种全新的安装,运行在VMWare Player中。 Git的安装方式如下:

I am not checking the SSL certificate (git config --global http.sslVerify false). This on a Redhat Enterprise Linux 5 virtual machine, a fresh installation, running in VMWare Player. Git was installed in the following manner:

./configure --with-openssl --with-expat=/opt/expat --with-curl=/opt --prefix=/usr/local
make all
make install

Libssh2(v1.4.2)是从源代码安装的; Curl和Expat的安装方式如下:

Libssh2 (v1.4.2) was installed from source; Curl and Expat were installed in the following manner:

#Curl v7.26
./configure --with-libssh2 --enable-shared --prefix=/opt
make; make install

# Expat v2.1
./configure --prefix=/opt/expat
make; make install

我可以访问的yum资源库中这些程序的版本相当老旧,太旧对于 git push 显然。错误信息对我来说相当混乱,不知道该怎么办。我可以克隆和拉过HTTP没有问题。

The versions of these programs in the yum repository I have access to are rather old, too old for git push apparently. The error message is rather confusing to me, not sure what to do with it. I am able to clone and pull over HTTP without problem.

推荐答案

我在Windows上有这个完全相同的错误。我尝试了几个不同版本的git,都有相同的错误。我最终将问题追查为由libcurl未找到或不在正确的位置导致的问题。在我的情况下,我将libcurl.dll从Git \ bin文件夹复制到Git\libexec\git-core文件夹。然后我不得不将它重命名为libcurl-4.dll。我的猜测是在你的情况下发生类似的事情,只要在* nix-land中找到libcurl共享库。

I had this exact same error on Windows. I tried a few different versions of git all with the same error. I eventually tracked down the problem as being caused by libcurl not being found or not being in the right place. In my case, I copied the libcurl.dll from the Git\bin folder to the Git\libexec\git-core folder. I then had to rename it to libcurl-4.dll. My guess is something similar is happening in your case as far as finding the libcurl shared library in *nix-land.

这篇关于git:'http-push'不是git命令。致命:git-http-push失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆