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

古城微笑少年丶 2022-07-16 03:22 222阅读 0赞

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[点击打开链接][Link 1]

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

  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

  1. 升级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/[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!

发表评论

表情:
评论列表 (有 0 条评论,222人围观)

还没有评论,来说两句吧...

相关阅读