当前位置:首页 - Linux

Linux Git fatal: Unable to find remote helper for 'https'

作者:高景洋 日期:2020-02-24 14:57:51 浏览次数:3750

1、  首先,确认一下,环境变量里,是否有git 配置

       如果没有,则依次执行以下命令

       (1)cd ~ ,进入用户根目录

         (2) vi .bashrc ,打开 bash 文件

         (3) 按 “i” 键,进入编辑状态

         (4) 在文件最后,追加 以下 两个环境变成


              export PATH=$PATH:/usr/local/git/bin

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

         (5) 执行,source .bashrc ,注意:如果不执行该命令,则修改的环境变量,要服务器重启后,才会生效


2、如果环境变量,存在且正常,则按以下步骤检查

         (1) 进入 /usr/local/git/libexec/git-core

         (2) 检查目录中,中否存在 git-remote-https

         (3) 如果不存在,则说明 是因为可执行文件中,不存在 git-remote-https ,导致无反使用git clone https://*****

         (4) 依次执行以下命令 (该过程比较慢)

                cd git-2.18.0 ,注:该目录是,git 压缩包的解压目录

        ./configure --prefix=/usr/local/git 
        make 
        make install
 
     (5) 重新进入 /usr/local/git/libexec/git-core ,检查 是否存在 git-remote-https,如果存在则表示正常
 (6) 重新执行 git clone https://gitlab-team.smzdm.com/cbd/data_collect_py.git /root/DataCollector/Program
     (7) 可以正常获取代码 



本文永久性链接:
<a href="http://r4.com.cn/art130.aspx">Linux Git fatal: Unable to find remote helper for 'https'</a>
当前header:Host: r4.com.cn X-Host1: r4.com.cn X-Host2: r4.com.cn X-Host3: 127.0.0.1:8080 X-Forwarded-For: 3.15.229.113 X-Real-Ip: 3.15.229.113 X-Domain: r4.com.cn X-Request: GET /art130.aspx HTTP/1.1 X-Request-Uri: /art130.aspx Connection: close Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) Referer: http://www.yuezhiji.net/art130.aspx