在使用git pull、git push、git clone的时候,或者在使用jenkins发版的时候,可能会报类似如下的错误:
error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/zemo/demo.git/info/refs
fatal: HTTP request failed
这个一般是由于服务器本身自带的git版本过低造成的,一般只需要将git版本升级到高版本即可。下面说下git升级的操作记录。
0)安装依赖软件
[root@1 ~]
[root@1 ~]1)卸载系统自带的底版本git(1.7.1)
[root@localhost ~]
git version 1.7.1
[root@localhost ~]2)编译安装最新的git版本
[root@localhost ~]
[root@localhost src]
[root@localhost src]
[root@localhost src]
[root@localhost git-2.15.1]
[root@localhost git-2.15.1]
[root@localhost git-2.15.1]
[root@localhost git-2.15.1][root@localhost ~]
git version 2.15.1