title: Basic authentication with the GitHub Api using PowerShell
body: <p>I have been trying to do <a href="https://developer.github.com/v3/auth/" rel="nofollow">basic authentication with the GitHub Api</a> with PowerShell. The following do not work: </p>
  
  <pre><code> &gt; $cred = get-credential
   # type username and password at prompt
  
   &gt; invoke-webrequest -uri https://api.github.com/user -credential $cred
  
   Invoke-WebRequest : {
       "message":"Requires authentication",
       "documentation_url":"https://developer.github.com/v3"
   }
  </code></pre>
  
  <p>How do we do basic authentication using PowerShell with the GitHub Api?</p>