title: How to automatically find the upstream URL for a fork on GitHub without hub?
body: <p>After forking and cloning a repository on GitHub, one usually <a href="https://help.github.com/articles/configuring-a-remote-for-a-fork/" rel="nofollow noreferrer">configures an upstream remote for the fork</a>:</p>
  
  <pre><code>$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPO.git
  </code></pre>
  
  <p>Is there a way of finding the upstream URL automatically (programmatically) <strong>without using <a href="https://hub.github.com/" rel="nofollow noreferrer">hub</a></strong> so I can create an alias (or a script) for the above command?</p>