登陆到远程linux服务器上,使用git, clone的时候报“fatal: Unable to find remote helper for 'https'”错,没管,绕过,使用git clone git://....协议download下来项目。

但是到提交完要push回服务器的时候,必须得用https,搜了一下问题,是系统中没有curl,都是要装curl的,比如:

yum install curl-devel

或者apt-get等

但是问题来了,远程服务器上没有sudo到root的权限怎么办?

得自己安装curl,从http://curl.haxx.se/download.html下载到最新的curl包:

curl-7.41.0.tar.gz

解压,然后make并安装:

./configure --prefix=/home/{username}/curl/

make

make install

安装好后,再尝试git push,还是报一样的错。

想到应该需要重新编译并安装git,执行:

./configure --prefix=/home/{username}/git/ --with-curl=/home/{username}/curl/

注意这里一定要使用--with-curl参数,指定到上面安装的curl目录,git只有与curl库做link之后,才能使用https功能。

再次make & make install

git push成功。

本次解决问题的经验教训:

实际上是重新编译时先使用./configure --prefix=/home/{username}/git/未果后才思考的,执行./configure --prefix=/home/{username}/git/ &> config.log,把log重定向到这个文件里打开,搜curl,发现curl的状态是no,表明这个configure没有找到curl,那么自然后面在make的时候也就无法完成link,然后./configure -h,看到--with-curl参数,想起需要指定,才搞定问题。

经验教训是遇到问题还是要自己思考一下原理,网上搜的文章都是有root权限的前提下能装到系统默认位置的方案,没有想原理,另外要注意观察日志,帮助理解问题。

参考链接:http://stackoverflow.com/questions/8329485/git-clone-fatal-unable-to-find-remote-helper-for-https

记一次git fatal: Unable to find remote helper for 'https'问题的解决的更多相关文章

  1. 【Git】git clone报错 git fatal: Unable to find remote helper for 'https'

    [参考资料] https://stackoverflow.com/questions/8329485/unable-to-find-remote-helper-for-https-during-git ...

  2. Git出现fatal: Unable to find remote helper for 'https'

    使用Git远程获取代码 git clone https://github.com/twlkyao/findfile.git 出现“fatal: Unable to find remote helper ...

  3. Ubuntu 16.04 fatal: Unable to find remote helper for 'https'

    在Windows10 的Linux子系统下安装oh-my-zsh的时候出现如下错误: fatal: Unable to find remote helper for 'https' 网上有描述说没有安 ...

  4. 使用 git clone 的时候出现 fatal: Unable to find remote helper for 'https' 解决办法

    安装 libcurl 和 curl yum install libcurl-devel yum install curl-devel 重编译git客户端

  5. ubuntu 14.04 git clone 出现 fatal: Unable to find remote helper for 'https'

    当你编译安装git时因为没有安装(lib)curl-devel所以导致git clone 和 git push 都会出现这个错误 如果你安装了(lib)curl-devel,然后重新编译安装git就没 ...

  6. Unable to find remote helper for 'https'

    出现这个报错,说明git目前的状态是正常的,要么没装好,要么自己解决压缩安装导致没有权限 第三次情况是,使用yum install git 重新安装后,仍然报错,是因为环境变量中GIT_HOM配置的仍 ...

  7. Git – fatal: Unable to create ‘/.git/index.lock’: File exists错误解决办法

    有时候在提交的时候,中间提交出错,导致有文件被lock,所以会报下面的错误: fatal: Unable to create ‘/msg/.git/index.lock’: File exists. ...

  8. git error: unable to write file xxx,git fatal: unable to write new index file

    执行git checkout -- . error: unable to write file mobile/manifest.jsonfatal: unable to write new index ...

  9. git: fatal unable to auto-detect email address

    参考:http://stackoverflow.com/questions/25671785/git-fatal-unable-to-auto-detect-email-address 正确使用命令: ...

随机推荐

  1. 5.2 Components — Defining A Component

    一.概述 1. 为了定义一个组件,创建一个模板,它的名字以components/开头.为了定义一个新组件{{blog-post}},例如,创建一个components/blog-post模板. 2.注 ...

  2. 001-springmvc之原理图

    1.流程. 2.时序图. 3.方法调用. (0)DispatcherServlet类.提供了HandlerMapping成员关联关系. /** MultipartResolver used by th ...

  3. python ConfigParser读取配置文件,及解决报错(去掉BOM)ConfigParser.MissingSectionHeaderError: File contains no section headers的方法

    先说一下在读取配置文件时报错的问题--ConfigParser.MissingSectionHeaderError: File contains no section headers 问题描述: 在练 ...

  4. 独家揭秘,106岁的IBM靠什么完成了世纪大转型|钛度专访

    IBM大中华区董事长陈黎明 到2017年2月,陈黎明就担任IBM大中华区董事长整整两年了. 五年前,IBM历史上首位女CEO也是第9位CEO罗睿兰上任,三年前,IBM在罗睿兰的带领下以数据与分析.云. ...

  5. 正在尝试解析依赖项“MvvmLightLibs (≥ 5.2.0.0)”。 “MvvmLightLibs”已拥有为“CommonServiceLocator”定义的依赖项

    正在尝试解析依赖项"MvvmLightLibs (≥ 5.2.0.0)". "MvvmLightLibs"已拥有为"CommonServiceLoca ...

  6. 基于std::string的字符串处理

    转自:http://zxdflyer.blog.163.com/blog/static/25664262201322510217495/ C++标准模板库std使用广泛.该库中处理字符串的对象为std ...

  7. 从0开始学习 GITHUB 系列之「团队合作利器 BRANCH」【转】

    本文转载自:http://stormzhang.com/github/2016/07/09/learn-from-github-from-zero6/ 版权声明:本文为 stormzhang 原创文章 ...

  8. rm删除某个文件之外的文件

    1.列出排除hns_dsaf_mac.c文件之外的.c文件 ls drivers/net/ethernet/hisilicon/hns/*.c |egrep -v '(hns_dsaf_mac.c)' ...

  9. Vim 的光标移动定位

    一.光标移动以单个字符为单位: 在命令模式中 h向左 l 向右 j 向上 k 向下 二.光标移动以word 为单位: w 将光标向前移动一个word; b 将光标向后移动一个word: 以上2个命令光 ...

  10. CodeForces 828C String Reconstruction(并查集思想)

    题意:给你n个串,给你每个串在总串中开始的每个位置,问你最小字典序总串. 思路:显然这道题有很多重复填涂的地方,那么这里的时间花费就会特别高. 我们维护一个并查集fa,用fa[i]记录从第i位置开始第 ...