码迷,mamicode.com
首页 > 其他好文 > 详细

Git 版本导致 clone 故障

时间:2016-09-21 11:35:46      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:


问题描述:

git clone 报错如下:

Initialized empty Git repository in /root/project_php/.git/
error: The requested URL returned error: 401 Unauthorized while accessing http://tone.verru.cn:88/project_php.git/info/refs

fatal: HTTP request failed

解决方法:

带着问题网上走一圈,查到资料说是 git 版本问题,建议升级到 1.8.3 以上。

shell > git --version
git version 1.7.1

# 好吧,那就升级。

shell > yum -y remove git
shell > yum -y install perl cpio autoconf tk zlib-devel libcurl-devel openssl-devel expat-devel gettext-devel perl-ExtUtils-MakeMaker

shell > cd /usr/local/src
shell > wget https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
shell > tar zxf git-2.10.0.tar.gz
shell > cd git-2.10.0
shell > autoconf
shell > ./configure
shell > make
shell > make insntall

# 建议不要 ./configure; make; make install ,出问题不好排查

shell > echo "PATH=$PATH:/usr/local/bin/" >> /etc/profile; source /etc/profile

shell > git --version
git version 2.10.0

# 再来克隆,发现正常。

shell > git clone http://tone.verru.cn:88/project_php.git

过程中小问题:

1、未安装 perl-ExtUtils-MakeMaker 报错如下:

/usr/bin/perl Makefile.PL PREFIX=/usr/local INSTALL_BASE=‘‘ --localedir=/usr/local/share/locale
Cant locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
make[1]: *** [perl.mak] 错误 2
make: *** [perl/perl.mak] 错误 2

2、未安装 expat-devel 报错如下:

git clone: fatal: Unable to find remote helper for http

# 如果是 https 应该是未安装 libcurl-devel ,建议按照文档都装上。

Git 版本导致 clone 故障

标签:

原文地址:http://www.cnblogs.com/wangxiaoqiangs/p/5891975.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!