GitKraken And Github - failed to get server certificate: The handle is in the wrong state for the requested operation

Angelos Chalaris picture Angelos Chalaris · Feb 26, 2018 · Viewed 12k times · Source

I am getting this error message from GitKraken whenever I try to clone/fetch/push/push to any of my Github repositories:

failed to get server certificate: The handle is in the wrong state for the requested operation

I have no idea why this is happening, everything was working fine with my current setup until yesterday and I have checked that GitKraken is properly authorized to connect to my Github account and my repositories.

What I have tried:

  • Remove and add my credentials, reauthorize GitKraken.
  • Check my Git installation - can correctly push/pull and clone Github repos.
  • Tested on another machine, I can reproduce the issue.
  • Reinstalled GitKraken.
  • Run as administrator.
  • Removed the .gitkraken folder under %AppData% and reconnected from scratch.
  • Installed the kb3140245 update as suggested in the GitKraken Slack channel to someone else with a similar issue.
  • Generated and added SSH keys via the GitKraken UI to connect to Github.

Technical Information:

  • GitKraken version: 3.3.4
  • OS: Windows 7 Ultimate (x64)

Anyone else have a similar problem or know how to deal with this?

PS: I am not entirely sure what other technical information might be of use to troubleshoot the issue, so feel free to ask me in the comments below to update my question with any relevant information.

Answer

Štāls Ingus picture Štāls Ingus · Feb 26, 2018

This is because Github removed weak cryptophic standard support (TLSv1 and TLSv1.1) - source

All you have to do on Windows devices (mostly on Windows 7) is set default TLS version to 1.2 - link

Step-by-step fix

  1. Download the kb3140245 update from Microsoft, which is necessary to enable TLS 1.1 and TLS 1.2.
  2. Download the easy fix utility from Microsoft and run it.
  3. Restart your system. Everything should work fine. There might be issues with some websites etc, just rebooting your router should resolve any issues that might arise.