git过程中

一般小于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

原文地址:https://www.cnblogs.com/bing2017/p/11555293.html