title: Git network operations behind corporate firewall using LibGit2Sharp throws
body: <p>I am trying to use LibGit2Sharp to <code>git push origin</code> using the following </p>
  
  <pre><code>using(var repo = new Repository("path\to\repo\.git"))
  {
     var commit = repo.Commit("Commit message", author, committer);
  
     var options = new PushOptions{ CredentialsProvider = (u, s, t) =&gt; new UserNamePasswordCredentials { Username = "username", Password = "password" } };
     repo.Network.Push(repo.Branches("master"), options); 
  }
  </code></pre>
  
  <p>I get a LibGit2SharpException saying </p>
  
  <blockquote>
    <p><em>Additional information: Failed to set proxy: The parameter is incorrect.</em></p>
  </blockquote>
  
  <p>But in git bash everything is fine when I do <code>git push origin</code>. </p>
  
  <p>We have NTLM proxy at work, and I am pushing to an intranet https remote URI. I have configured the proxy as <code>http://username:password@proxy.fqdn:80</code> in the following:</p>
  
  <ul>
  <li>Env vars: HTTP_PROXY &amp; HTTPS_PROXY</li>
  <li>repos .git/config:
  
  <ul>
  <li>remote.origin.proxy</li>
  <li>http.proxy</li>
  <li>https.proxy</li>
  <li>http.sslCAInfo &amp; https.sslCAInfo - this is the path to the root CA for the host</li>
  </ul></li>
  </ul>
  
  <p>Having read through <a href="https://stackoverflow.com/a/28811640/269452">this SO and links there</a> it seems like libgit2sharp should find the proxy parameter just fine. Has anyone gotten this to work behing ntlm?</p>
  
  <p>I am using:
  Windows 7, LibGit2Sharp.0.22.0, Git 2.10.1.windows.1, bash 4.3.46, .net4.5.2</p>
  
  <p>Any ideas/tricks on achieving the push through an alternative are greatly welcome too!</p>