How to fix "The requested URL returned error: 401 Unauthorized while accessing" “fatal: HTTP request failed” Git

First, confirm that you have specific version of git:
git --version
git version 1.7.1
Now, upgrade git on Centos 6 to more recent version:
sudo yum install epel-release
sudo yum install https://centos6.iuscommunity.org/ius-release.rpm
sudo yum install yum-plugin-replace
sudo yum replace git --replace-with git2u
If Centos 7 :
sudo yum -y remove git
sudo yum -y install  https://centos7.iuscommunity.org/ius-release.rpm
sudo sudo yum -y install  git2u-all
Now you have a more recent git version which will likely have no error mentioned above.


Comments