title: How to set up Git to get through a proxy
body: <p>I want to connect to GitHub at work and need to get through the http proxy. I am able to get out for FTP using cURL using the command</p>
  
  <blockquote>
    <p><code>curl -v -g --ftp-pasv --upload-file MYFILE --proxy PROXYADDRESS:PROXYPORT --proxy-ntlm --proxy-user WINDOWSDOMAIN\WINDOWSUSER:WINDOWSPASSWORD ftp://FTPUSER:FTPPASS@FTPURL/</code></p>
  </blockquote>
  
  <p>I've so far not been able to provide equivalent settings for Git.</p>
  
  <p>I tried following instructions on <a href="http://returnbooleantrue.blogspot.com/2009/06/using-github-through-draconian-proxies.html">Using Github Through Draconian Proxies</a> under cygwin.</p>
  
  <p>I've got corkscrew installed and tried to SSH to GitHub</p>
  
  <pre><code>ssh github.com
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ssh ssh.github.com
  </code></pre>
  
  <p>I get back </p>
  
  <blockquote>
    <p>ssh: Could not resolve hostname ssh.github.com: hostname nor servname provided, or not known.</p>
  </blockquote>
  
  <p>I've tried setting the http and https proxy.</p>
  
  <p>Here is the output from git --config -l</p>
  
  <pre><code>core.symlinks=false
  core.autocrlf=true
  color.diff=auto
  color.status=auto
  color.branch=auto
  color.interactive=true
  pack.packsizelimit=2g
  help.format=html
  http.sslcainfo=C:/Program Files/Git/bin/curl-ca-bundle.crt
  sendemail.smtpserver=/bin/msmtp.exe
  diff.astextplain.textconv=astextplain
  user.name=Peter Wilkinson
  user.email=someemail@gmail.com
  github.user=ProggerPete
  github.token=shouldprobablykeepthissecret
  http.proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  https.proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  </code></pre>
  
  <p>I've also run</p>
  
  <pre><code>export https_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  export http_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  set https_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  set http_proxy=http://somedomain\someuser:somepass@10.167.116.142:80
  </code></pre>
  
  <p>I then try and clone and get.</p>
  
  <pre><code>$ git clone https://ProggerPete@github.com/project/JavaScript-Maven-Plugin.git
  Cloning into JavaScript-Maven-Plugin...
  Password:
  error: The requested URL returned error: 407 while accessing https://ProggerPet
  @github.com/project/JavaScript-Maven-Plugin.git/info/refs
  
  fatal: HTTP request failed
  </code></pre>
  
  <p>This looks to me like I'm failing authentication with the proxy. However I'm using the same login and pass that works for FTP via cURL.</p>
  
  <p>How can I get connected?</p>