"fatal: HttpRequestException encountered." Error with GitHub/Bitbucket Repositories due to dropping TLS-1.0 support

Eric Bringley picture Eric Bringley · Mar 2, 2018 · Viewed 33.1k times · Source

Problem

I recently encountered the following message when I pushed to a GitHub repo:

"fatal: HttpRequestException encountered. " followed by being prompted for my username and password again.

From previous searches, Visual Studio and various others have the same root problem. For those lazier than I am, a summary of the various solutions for different applications/OS are here with relevant discussions. Hopefully people find this helpful.

Reason

Can't really call updating sercurity a problem, so here's the reason. The issue is GitHub has removed TLS-1.0 support which is causing the problem with clients including Microsoft Visual Studio's built in git client, versions of Git below 1.14 as well as GUI clients includint tortoiseGit, etc. The full release notes can be found here: https://githubengineering.com/crypto-removal-notice/

Bitbucket will drop TLSv1.0 and TLSv1.1 starting 1 Dec 2018. I expect similar problems as before.

Solution

Edit: moved my self-answer to an answer box. See below.

Answer

Eric Bringley picture Eric Bringley · Mar 5, 2018

Git hub has removed TLS-1.0 from it's authentication services. https://githubengineering.com/crypto-removal-notice/

Solutions

Windows Clients

Use Version 2.14.3 (or newer) of Git for Windows and newer include an up-to-date Git Credential Manager for Windows: https://gitforwindows.org/

You can also explicitly update your Git Windows Credencial Manager to the latest version, 1.14.0, to get TLS-1.2 support: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/v1.14.0

Visual Studio Clients

It is suggested to update your client to VS 2017 or, if you cannot upgrade, there are two machine-wide registry keys you can set that affect all .NET-based applications on the client machine that you can change... https://developercommunity.visualstudio.com/content/problem/201457/unable-to-connect-to-github-due-to-tls-12-only-cha.html

JDK

TLS-1.2 is default in JDK8 and available in JDK7. https://blogs.oracle.com/java-platform-group/diagnosing-tls,-ssl,-and-https

Red Hat native Git clients

RH 5 does not support TLS-1.2 and GitHubEngineering suggest updating to newer versions of the OS. RH 6.8 and 7.2 will support TLS-1.2. https://www.linuxquestions.org/questions/blog/mensawater-183304/rhel5-wont-support-tlsv1-1-or-higher-36951/