兵兵有你

人品好,气质差.丢了工作就回家...

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

一般小于1.7.10的 git 版本会报如下错

error: The requested URL returned error: 401 Unauthorized while accessing

解决方法:先删除原来的git

yum remove git

再安装2.2版本的gitwget https://github.com/git/git/archive/v2.2.1.tar.gz

 wget https://github.com/git/git/archive/v2.2.1.tar.gz
# tar zxvf v2.2.1.tar.gz
# cd git-2.2.1
# make configure
# ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
# make all doc
# make install install-doc install-html
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

  ==================================

错误提示:git push.default Update were rejected because a pushed branch tip is behand remote

解决:git config --global push.default current

 

posted on 2019-09-20 10:22  greatbing  阅读(229)  评论(0编辑  收藏  举报