Sourcetree Suddenly Prompting for Github Credentials
As a developer you’re probably familiar with the phrase “It was working before and I didn’t change anything!”
That hit me today as I attempted to pull an update from a Github repo using Sourcetree. I was prompted for Github credentials, which were repeatedly rejected. After verifying that the credentials were valid (and that I wasn’t hacked, whew) I did some hunting and found some helpful errors in the Git terminal and event viewer:
fatal: HttpRequestException encountered.
An error occurred while sending the request.
System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
That last one was particularly helpful (wish that Sourcetree would have surfaced this so I could have known better what to search for), and after a bit more hunting found this helpful thread:
In the Sourcetree options under Network are two checkboxes to enable TLS 1.1 and/or TLS 1.2. Enabling both did not fix the problem, but checking ONLY the option for TLS 1.2 resolved the issue. I entered my credentials once more and am back to coding.
Edit: If you are unable to make this change or this fix doesn’t work for you, check out this link: https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in
Thanks to @GitKraken for the tip!
Edit 2: More info linked from the Git-Credential-Manager-for-Windows repo: Unable to connect to GitHub due to TLS 1.2 only change (HttpRequestException encountered. An error occurred while sending the request)
Hope this is helpful!
Latest posts by selaromdotnet (see all)
- Adding Ratings and Reviews to Sitecore Commerce with YotPo - November 13, 2018
- Sourcetree Suddenly Prompting for Github Credentials - February 22, 2018
- Xamarin Forms: Public C# Properties Missing on Android - June 19, 2017