Sourcetree cannot refresh OAuth token, I get error ERR_SSL_PROTOCOL_ERROR

Viewed 957

When using Atlassian's Sourcetree I try and and "Refresh OAuth Token" and I see this error:

This site can’t provide a secure connection
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
2 Answers

The issue here is we were developing a website that sets the HSTS header such that all localhost requests now require HTTPS.

The work-around is to remove localhost from your domain security policies.
If Chrome is your browser, you can do that here: chrome://net-internals/#hsts
Under the heading Delete domain security policies enter localhost in the 'domain' input and press delete

Now try and "Refresh OAuth Token" again.

Using Chrome I had this issue, my workaround for this was:

  1. Open an incognito Window
  2. Paste in the localhost address and change HTTPS to HTTP
  3. Refresh page and I'm authenticated

I'm on SourceTree version 3.3.8

Related