最近要用测试机(CentOS6)测试项目代码,代码放在gitlab。
yum安装的git版本是1.7.1,在clone gitlab repo的时候,报如下错误。
error: The requested URL returned error: 401 Unauthorized while accessing https://gitlab.com/arkii/xxx.git/info/refs fatal: HTTP request failed
|
解决办法是升级git版本到2以上。
升级过程如下
wget https://github.com/git/git/archive/v2.4.3.tar.gz yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x docbook2X tar -zxf v2.4.3.tar.gz cd git-2.4.3 make configure ./configure make -j8 all doc info make install install-doc install-html install-info ln -s /usr/local/git2.4.3/bin/git /usr/bin/
|