title: Unable to set the Git https url – it switches automatically to git protocol
body: <p>There is a very weird issue I have seen today on a Windows machine, specifically: <code>git push origin master</code> would fail with a message similar with this:</p>
  <pre><code>Unable to push to git://github.com/user/repo
  Please use https://github.com/user/repo
  </code></pre>
  <p>Cool, so we tried <code>git remote set-url origin 'https://github.com/user/repo'</code>.</p>
  <p>When we tried to push again, a new error appeared:</p>
  <pre><code>Unrecognized protocol 'https
  </code></pre>
  <p>This particular error, strangely, happens because of the way how Command Prompt looks at the wrapping quotes, so it may be not related to git.</p>
  <p>Ran again, the same command, but without quotes: <code>git remote set-url origin https://github.com/user/repo</code></p>
  <p>Now, surprise! When running <code>git remote -v</code> it should the <code>git://github.com/user/repo</code>.</p>
  <p>The exact behavior happens when using GitHub for Desktop. When setting an https url in this format: <code>https://github.com/user/repo</code> it is automatically changed to <code>git://github.com/user/repo</code>.</p>
  <hr />
  <p>We fixed the issue by switching to ssh urls, but this still remains a mistery.</p>
  <hr />
  <p>Why is this happening at all? How to debug this?</p>