Myster
Myster

Reputation: 18104

Sourcetree cannot refresh OAuth token, I get error ERR_SSL_PROTOCOL_ERROR

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

Upvotes: 2

Views: 2849

Answers (2)

user1308816
user1308816

Reputation: 31

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

Upvotes: 3

Myster
Myster

Reputation: 18104

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.

Upvotes: 12

Related Questions