git clone: TCP connection reset by peer
git clone 失败报错:解决办法:卸载老版本git安装新版本git下载git安装包解压安装4.设置环境变量再次git clone 成功
·
git clone 失败
报错: TCP connection reset by peer
[lj@localhost ~]$ git clone http://github.com/diem/diem.git && cd diem
正克隆到 'diem'...
fatal: unable to access 'http://github.com/diem/diem.git/': TCP connection reset by peer
[lj@localhost ~]$ git clone https://github.com/diem/diem.git && cd diem
正克隆到 'diem'...
fatal: unable to access 'https://github.com/diem/diem.git/': Failed connect to github.com:443; Connection refused
[lj@localhost ~]$ git --version
git version 1.8.3.1
[lj@localhost ~]$ sudo yum remove git
解决办法:
卸载老版本git
sudo yum remove git
安装新版本git
- 安装依赖
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc -y
sudo yum install gcc perl-ExtUtils-MakeMaker -y
- 下载git安装包
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.28.0.tar.gz
- 解压安装
tar -zxf git-2.28.0.tar.gz
mkdir -p ~/local/git
cd git-2.28.0/
./configure --prefix=$HOME/local/git
make && make install
4.设置环境变量
export PATH=$HOME/local/git/bin:$PATH
#查看git版本
git version
[lj@localhost git-2.28.0]$ git version
git version 2.28.0
再次git clone 成功
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献7条内容
所有评论(0)