Git push failing with Fatal: HttpRequestException encountered

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!


Solution 1:

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.

Solution 2:

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.)

Solution 3:

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.

Solution 4:

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