您的位置:首页 > 理论基础 > 计算机网络

fatal: Unable to find remote helper for 'https' (git push -u origin master)(Red Hat /centos6.7)

2016-09-30 22:05 417 查看
problem:

[root@localhost awesome-python3-webapp]# git remote add origin https://github.com/wenjie19861113/awesome-python3-webapp.git
[root@localhost awesome-python3-webapp]# git push -u origin master

fatal: Unable to find remote helper for 'https'
解决:

安装最新版本git后重启,安装方法参考:http://blog.csdn.net/wuhao13601400547/article/details/52576487点击打开链接

艰难曲折的解决过程如下:

1.  尝试yum -y install git-core gitk git-gui,失败

[root@localhost awesome-python3-webapp]# yum -y install git-core gitk git-gui

Loaded plugins: fastestmirror, product-id, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Setting up Install Process

Loading mirror speeds from cached hostfile

Resolving Dependencies

...

Dependency Installed:

  perl-Error.noarch 1:0.17015-4.el6      perl-Git.noarch 0:1.7.1-4.el6_7.1   

Complete!

[root@localhost awesome-python3-webapp]# git push -u origin master

fatal: Unable to find remote helper for 'https'

2.尝试添加路径到$PATH,失败

[root@localhost lib64]# echo $PATH

/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin:/usr/local/git/bin

[root@localhost lib64]# cd /usr/local/git

[root@localhost git]# ls

bin  lib64  libexec  share

[root@localhost git]# cd libexec

[root@localhost libexec]# ls

git-core

[root@localhost libexec]# cd git-core

[root@localhost git-core]# ls

。。。

PS: git-remote-https cannot find in this folder

[root@localhost /]# git --version

git version 1.7.1

PS: update the version

3. 升级git到版本2.4.5,还是推送失败

update to git-2.4.5

#yum install -y tk zlib-devel openssl-devel perl cpio expat-devel gettext-devel asciidoc xmlto

#yum install -y perl-ExtUtils-MakeMaker
package

# yum -y remove git

# wget http://soft.laozuo.org/git/git-2.4.5.tar.gz
# tar -zxvf git-2.4.5.tar.gz

# cd git-2.4.5

# autoconf

# ./configure --prefix=/pot/git-2.4.5

# make

# make install

# ln -s /opt/git-2.4.5/bin/git /usr/bin/git

# git --version

>git version 2.4.5

cd 到要推送的本地仓库

[root@localhost awesome-python3-webapp]# git push -u origin master

fatal: Unable to find remote helper for 'https'

4.尝试yum install curl-devel,还是失败

#yum install curl-devel

# cd git-2.4.5

# autoconf

# ./configure --prefix=/pot/git-2.4.5

# make

# make install

cd 到要推送的本地仓库

# git push -u origin master

fatal: Unable to find remote helper for 'https'

5.下载和安装最新的 curl,还是失败
https://curl.haxx.se/download.html
download:curl-7.50.3.tar.gz

#cd ~/Downloads

#tar -zxvf curl-7.50.3.tar.gz

#cd curl-7.50.3

#./configure --prefix=/opt/curl/

#make

#make install

# cd git-2.4.5

# autoconf

# ./configure --prefix=/pot/git-2.4.5 --with-curl=/opt/curl/

# make

# make install

cd 到要推送的本地仓库

# git push -u origin master
fatal: Unable to find remote helper for 'https'

6.重启后安装最新版本的git-2.10.0,这次总算成功了

#reboot

...

#cd ~/Downloads

#wget https://www.kernel.org/pub/software/scm/git/ href="https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz" target=_blank>git-2.10.0.tar.gz

#tar -zxvf git-2.10.0.tar.gz

#cd
git-2.10.0

#make configure

# ./configure --prefix=/pot/git-2.10.0

#make all doc

# make install install-doc install-html

...

make: *** [install-doc] Error 2   (2个错误,不管它)

#mkdir /usr/local/bin

# ln -s /opt/git-2.10.0/bin/git /usr/local/bin/git

# git --version

>git version 2.10.0

cd 到要推送的本地仓库

# git push -u origin master

弹出用户名输入窗口——终于搞定,yeah!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息