ubuntu Git升级

前端之家收集整理的这篇文章主要介绍了ubuntu Git升级前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

最近在使用git提交代码git push origin master的时候报错:

The requested URL returned error: 401 Unauthorized while accessing https://gitee.com/hgdq/项目名字.git/info/refs

后来百度发现时服务器上面安装的git版本过低。
原文地址:http://www.cnblogs.com/kaituorensheng/p/5491601.html
1. 下载:# wget -O git.zip https://github.com/git/git/archive/master.zip

  1. 解压:# unzip git.zip

  2. 进入git目录:# cd git-master

  3. 编译安装:

autoconf
./configure --prefix=/usr/local
make && make install
  1. 最后别忘了删掉旧的git,并把新版本的git建立软链接到/usr/bin/git
rm /usr/bin/git
ln -s /usr/local/bin/git /usr/bin/git
原文链接:https://www.f2er.com/ubuntu/351220.html

猜你在找的Ubuntu相关文章