4

I have been pushing and pulling files to and from my github repositories without problems for the last 4 years. Two days ago, I tried pulling from the repos with the same command i have been using ever since: git pull origin master but i keep getting the error "error: while accessing https://github.com/username/projectname/info/refs . fatal: HTTP request failed". I can push without problems using the command: git push origin master. What is the problem here? I tried the suggestions given on some so questions like "[Pushing to Git returning Error Code 403 fatal: HTTP request failed]" but none has worked. I use the free version of github. Could it be an issue of quota limits for pulls? change in github settings? Or what could be the problem?

nixxx
  • 423
  • 1
  • 9
  • 23

3 Answers3

24

I had the same problem that is happened because GitHub Permanently disable deprecated algorithms in February 22, 2018 19:00 UTC (11:00 am PST)

And I fixed it using : sudo yum update -y nss curl libcurl

Mohamed Zaytoun
  • 293
  • 1
  • 11
  • still cannot pull – einverne Mar 09 '18 at 01:53
  • This worked for me, thank you! It has only just broken, 9 months after the update that you mentioned?! Unless there has been another update this weekend which I'm unaware of. – Hunter Dec 04 '18 at 10:13
  • Finally, this fixed it for me. I was attempting to push to Bitbucket on CentOS 6.7 and getting this generic error. Other things I tried before getting here include ensuring name and email were set, changing user in remote URL, setting bitbucket.org IP in /etc/hosts file, updating git, updating root CA certificates, and setting sslVerify to false—nothing else worked. Bitbucket has also just disabled old TLS versions: https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01. – cr0ybot Dec 14 '18 at 04:00
  • this worked for me. i'm running git 1.7.1 on a centos 6.x box. – Ryan B. Jan 28 '19 at 22:14
3

My steps are:

  1. Change the git remote url from https to ssh
  2. Create ssh key and add to the ssh agent (https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)
  3. Add the public key to your git repository service account --- By copying the content of the key you generated from 2 into your account settings. We use BitBucket so Settings> SSH keys (under SECURITY) > Add Key (to the key box and save)
Nadia Zhu
  • 31
  • 2
0

After getting the same error, I had to update git on my CentOS 6.5. Because there are no packages newer available through the official repo configured on my OS, I had to :

  • install the IUS repository : https://ius.io/GettingStarted/
  • remove my actual git install
  • install perl-TermReadKey
  • install newer version of git :

    yum install yum --disablerepo=base,updates --enablerepo=ius update git
    

Then I was able to push (after it asked me for my username/password Github)

Pozinux
  • 964
  • 2
  • 10
  • 22