title: GIT appears to ignore my ssh config file
body: <p>I am behind a proxy so I decided to use corkscrew and an ssh config file to connect to bitbucket.</p>
  
  <p>My <code>~/.ssh/config</code> file:</p>
  
  <pre><code>Host bitbucket.org
    Hostname altssh.bitbucket.org
    User git
    IdentityFile ~/.ssh/id_rsa
    ProxyCommand /usr/bin/corkscrew &lt;proxy_url&gt; &lt;proxy_port&gt; %h %p
    Port 443
  </code></pre>
  
  <p>Clear enough, I define my proxy settings and tunnel my ssh connection through https on port 443.</p>
  
  <p>It appears to work ok when I test <code>ssh -vT git@bitbucket.org</code>
  Here is the full verbose output showing a successful connection:</p>
  
  <pre><code>OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
  debug1: Reading configuration data /home/sierraromeo/.ssh/config
  debug1: /home/sierraromeo/.ssh/config line 1: Applying options for bitbucket.org
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 19: Applying options for *
  debug1: Hostname has changed; re-reading configuration
  debug1: Reading configuration data /home/sierraromeo/.ssh/config
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 19: Applying options for *
  debug1: Executing proxy command: exec /usr/bin/corkscrew &lt;proxy_url&gt; &lt;proxy_port&gt; altssh.bitbucket.org 443 ~/.ssh/auth
  debug1: permanently_drop_suid: 1001
  debug1: identity file /home/sierraromeo/.ssh/id_rsa type 1
  debug1: identity file /home/sierraromeo/.ssh/id_rsa-cert type -1
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
  debug1: Remote protocol version 2.0, remote software version conker_1.0.268-723a194 app-132
  debug1: no match: conker_1.0.268-723a194 app-132
  debug1: SSH2_MSG_KEXINIT sent
  debug1: SSH2_MSG_KEXINIT received
  debug1: kex: server-&gt;client aes128-ctr hmac-sha1 none
  debug1: kex: client-&gt;server aes128-ctr hmac-sha1 none
  debug1: sending SSH2_MSG_KEX_ECDH_INIT
  debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
  debug1: Host '[altssh.bitbucket.org]:443' is known and matches the RSA host key.
  debug1: Found key in /home/sierraromeo/.ssh/known_hosts:2
  debug1: ssh_rsa_verify: signature correct
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug1: SSH2_MSG_NEWKEYS received
  debug1: SSH2_MSG_SERVICE_REQUEST sent
  debug1: SSH2_MSG_SERVICE_ACCEPT received
  debug1: Authentications that can continue: publickey
  debug1: Next authentication method: publickey
  debug1: Offering RSA public key: /home/sierraromeo/.ssh/id_rsa
  debug1: Server accepts key: pkalg ssh-rsa blen 535
  debug1: key_parse_private2: missing begin marker
  debug1: read PEM private key done: type RSA
  debug1: Authentication succeeded (publickey).
  Authenticated to altssh.bitbucket.org (via proxy).
  debug1: channel 0: new [client-session]
  debug1: Entering interactive session.
  debug1: Sending environment.
  debug1: Sending env LANG = fr_FR.UTF-8
  debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
  logged in as SierraRomeo.
  
  You can use git or hg to connect to Bitbucket. Shell access is disabled.
  debug1: channel 0: free: client-session, nchannels 1
  Transferred: sent 4048, received 1984 bytes, in 0.2 seconds
  Bytes per second: sent 18748.6, received 9189.0
  debug1: Exit status 0
  </code></pre>
  
  <p>But when I simply run a <code>git pull</code> (or any other git command) it appears the config file is ignored.</p>
  
  <pre><code>ssh: Could not resolve hostname bitbucket.org: Name or service not known
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights and the repository exists.
  </code></pre>
  
  <p>My <code>project/.git/config</code> file has been checked and looks ok:</p>
  
  <pre><code>[core]
      repositoryformatversion = 0
      filemode = true
      bare = false
      logallrefupdates = true
  [remote "origin"]
      url = git@bitbucket.org:path/to/project.git
      fetch = +refs/heads/*:refs/remotes/origin/*
  [branch "master"]
      remote = origin
      merge = refs/heads/master
  </code></pre>
  
  <p>I'm probably missing something here but cannot see what.</p>
  
  <p>Why is ssh connecting when doing <code>ssh -T git@bitbucket.org</code> and failing instantly when using a <code>git &lt;command&gt;</code>?</p>
  
  <p>Any help will be much appreciated. </p>
  
  <p>(I'm running GIT 1.9.1 on Ubuntu 14.04 LTS)</p>