title: How can I check write access to a remote Git repository ("can I push?")
body: <p>I am building a (somewhat limited) Git client. To set up a repository, you enter the URL to the remote repo. I want to check whether the user has read+write access to that repository. If not, I present an authentication dialog.</p>
  
  <p>I check <strong>'read' access</strong> with <code>git ls-remote &lt;url&gt;</code>.</p>
  
  <p>Is there an analogous way to check <strong>'write' access</strong>, without cloning the repo first? (I know I could <code>git clone &lt;url&gt;</code> and then <code>git push --dry-run</code>)</p>