Git push failing with Fatal: HttpRequestException encountered

37

9

lt is really strange that when l try to use git push today,error reports Fatal: HttpRequestException encountered and requires me to enter username and password.

l have tried git pull and git clone and they both work well.

And it works well before this day and regenerating ssh key seems to be useless.

Can anyone help me with that? Thanks in advance!

Rosmee

Posted 2018-02-23T07:25:22.633

Reputation: 373

Try git clone the repo again, copy your changes and git push them. Maybe the remote url or something configuration-related changed? – miravalls – 2018-02-23T08:03:33.317

Possible duplicate of StackOverflow Cant push git, visual studio. Git failed with a fatal error. fatal: HttpRequestException encountered

– MiFreidgeim SO-stop being evil – 2018-03-03T13:11:03.200

Answers

46

Are you using Windows and GitHub? This is because GitHub disabled weak encryption, specifically TLS v1.0 and v1.1

Using the Git Credential Manager for Windows will fix this. You can download the latest version.

felipeengel

Posted 2018-02-23T07:25:22.633

Reputation: 584

Yes! l will try it – Rosmee – 2018-02-23T08:53:22.997

I am having a similar issue, but this does not fix it. I already have the lattest version installed. :( – Aaron C – 2018-04-05T17:24:41.623

7

Felipe's answer is correct. Just wanted to mention that updating Git for Windows also works.

It updates Git Credential Manager, Git itself and all other bundled software at the same go.

(Not enough reputation to comment so had to add this as an answer instead.)

Daedalon

Posted 2018-02-23T07:25:22.633

Reputation: 171

2

You can download and reinstall the latest source release of Git from https://git-scm.com/
I am using windows and it worked for me.

Tomer Hadad

Posted 2018-02-23T07:25:22.633

Reputation: 21

1

I had the same issue. If you are using 2FA, you need to use your access token instead of a password.

rodeluxe

Posted 2018-02-23T07:25:22.633

Reputation: 11