自己搭建服务器环境为centos6.5,需要使用git clone 命令的时候报错

首先查看centos上安装的git版本,我的版本为1.7.10

报错后,查阅相关资料需将centos升级,操作如下

安装需求

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

卸载Centos自带的git1.7.1

通过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1

# yum remove git

下载git2.1.2并将git添加到环境变量中

下载git最新版本

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.1.2.tar.gz
# tar xzf git-2.1.2.tar.gz

安装git并添加到环境变量中

# cd git-2.1.2
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

查看版本号

# git --version
git version 2.1.2

安装完成后使用git clone https://xxxx.git(url)

报错fatal: unable to access 'https://xxxx.git/': SSL connect error

查资料后认为nss curl libcurl 需要升级

执行如下操作:

yum update -y nss curl libcurl

完成后执行git clone https://xxxx.git(url),大功告成。。。
---------------------
作者:cplasfc3
来源:CSDN
原文:https://blog.csdn.net/cplasfc3/article/details/80088212
版权声明:本文为博主原创文章,转载请附上博文链接!

centos6.5 git clone http 报错的更多相关文章

  1. git clone 命令报错 +diffie-hellman-group1-sha1

    解决方法: 在.ssh目录下新建文件config , 添加 Host * KexAlgorithms +diffie-hellman-group1-sha1 到文件config,即可.

  2. Git从远程clone项目报错cannot open git-upload-pack,将http.sslVerify设为false即可

    通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错 通过https访问Git远程仓库,如果服务器的SSL证书没有经过第三方机构签署,就会出现cannot ...

  3. 在使用 Git pull 时候报错 error: inflate

    在使用 Git pull 时候报错 error: inflate 具体的错误是 这样的 error: inflate: data stream error (unknown compression m ...

  4. git同步遇到报错

    git同步遇到报错 “fatal: unable to access ‘https://github.com/ruanwenwu/newp.git/‘: Peer reports incompatib ...

  5. git https 请求报错 504

    git https 请求报错 504 原因可能是因为设置了代理,ubuntu/deepin 系统可以检查 /etc/profile ~/.bashrc 内有没有设置 https 的代理. 有的话,去掉 ...

  6. git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git

    项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下: error: pathspec 'origin/test' did ...

  7. git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompatible or unsupported protocol version.”

    git同步遇到报错“fatal: unable to access 'https://github.com/lizhong24/mysite2.git/': Peer reports incompat ...

  8. git提交代码报错 trailing whitespace的解决方法

    1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...

  9. AS 新电脑clone项目报错:Clone failed: Authentication failed for 'https://gitee.com/XXX/Demo.git/'

    在新的电脑上安装Android Studio,并且使用git clone 项目,报以下错误: Clone failed: Authentication failed for 'https://gite ...

随机推荐

  1. dubbo学习 一 dubbo概述

    1,背景     1,网站刚开时候的时候可能所有的功能业务都在一个应用里面 2,当业务不断复杂,流量不断增多的时候,就需要将原先的一个应用划分成多个独立的应用. 3,当分出来的业务越来越多的时候,应用 ...

  2. Storm集群部署及单词技术

    1. 集群部署的基本流程 集群部署的流程:下载安装包.解压安装包.修改配置文件.分发安装包.启动集群 注意: 所有的集群上都需要配置hosts vi  /etc/hosts 192.168.239.1 ...

  3. Java微信公众平台开发【番外篇】(七)--公众平台测试帐号的申请

    转自:http://www.cuiyongzhi.com/post/45.html 前面几篇一直都在写一些比较基础接口的使用,在这个过程中一直使用的都是我个人微博认证的一个个人账号,原本准备这篇是写[ ...

  4. 【294】◀▶ Python 字符串说明

    目录: 一.Python访问字符串中的值 二. Python 转义字符 三.Python 字符串运算符 参考:Python 字符串 一.Python访问字符串中的值   Python不支持单字符类型, ...

  5. Python常用算法

    本节内容 算法定义 时间复杂度 空间复杂度 常用算法实例 1.算法定义 算法(Algorithm)是指解题方案的准确而完整的描述,是一系列解决问题的清晰指令,算法代表着用系统的方法描述解决问题的策略机 ...

  6. elasticsearch2.x线程池配置

    一个Elasticsearch节点会有多个线程池,但重要的是下面四个: 索引(index):主要是索引数据和删除数据操作(默认是cached类型) 搜索(search):主要是获取,统计和搜索操作(默 ...

  7. 【项目运行异常】BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

    java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking ...

  8. Eclipse右击jsp没有运行选项

    maven项目低级错误,没有更新maven资源库.....更新后就运行起来了

  9. opencv3 图片模糊操作-均值滤波 高斯滤波 中值滤波 双边滤波

    #include <iostream>#include <opencv2/opencv.hpp> using namespace std;using namespace cv; ...

  10. 自制模仿apache访问日志文件格式的php日志类

    <?php // 访问日志写入类 @author 王伟 2011.12.14class Log{        //项目跟路径    private $root_path;        //日 ...