title: Multiple ssh keys are not working
body: <pre><code>OS Description: Ubuntu 14.04.3 LTS
  ssh: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3, OpenSSL 1.0.1f 6 Jan 2014
  </code></pre>
  
  <p>I am unable to use multiple ssh key for gitlab. The error I am getting is</p>
  
  <pre><code>GitLab: The project you were looking for could not be found.
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists. 
  </code></pre>
  
  <p>I am pretty much sure that I did everything right 
  This is my config file </p>
  
  <pre><code>Host work gitlab.com
      Hostname gitlab.com
      IdentityFile ~/.ssh/ida_rsa
      User git
  
  Host integrate gitlab.com
      Hostname gitlab.com
      IdentityFile ~/.ssh/ida_rsa_personal
      User git
  </code></pre>
  
  <p>The keys are added automatically in ssh-agent, but to make sure I also added the key manually</p>
  
  <pre><code>$ ssh-add -l
  2048 e7:08:d6:8c:00:28:31:f9:3f:21:4a:0f:4e:1e:ee:20 id_rsa (RSA)
  2048 ff:22:f6:90:2b:7c:9f:ed:45:41:df:79:06:de:fe:81 id_rsa_personal (RSA)
  </code></pre>
  
  <p>My ssh-agent is also running</p>
  
  <pre><code>$ ssh-agent
  SSH_AUTH_SOCK=/tmp/ssh-uTC6tA5HMt1x/agent.4899; export SSH_AUTH_SOCK;
  SSH_AGENT_PID=4900; export SSH_AGENT_PID;
  echo Agent pid 4900;
  </code></pre>
  
  <p>Permissions of ssh key</p>
  
  <pre><code>-rw-------  1 yogi yogi  1679 jun 25 15:38 id_rsa
  -rw-------  1 yogi yogi  1679 ago 25 10:53 id_rsa_personal
  -rw-r--r--  1 yogi yogi   404 ago 25 10:53 id_rsa_personal.pub
  -rw-r--r--  1 yogi yogi   391 jun 25 15:41 id_rsa.pub
  </code></pre>
  
  <p>I added my ssh public key on gitlab.</p>
  
  <p>Could any one please tell me what I am missing ?</p>
  
  <p>Note :- 
  I noticed that out of my two ssh keys, the ssh key which is on top( id_rsa - e7:08....) works fine.  </p>
  
  <pre><code>$ ssh-add -l
  **2048 e7:08:d6:8c:00:28:31:f9:3f:21:4a:0f:4e:1e:ee:20 id_rsa (RSA)**
  2048 ff:22:f6:90:2b:7c:9f:ed:45:41:df:79:06:de:fe:81 id_rsa_personal (RSA)
  </code></pre>
  
  <p>If I add id_rsa_personal(ff:22..) after id_rsa, than id_rsa_personal starts working fine and id_rsa stops working.</p>
  
  <pre><code>$ ssh-add -l
  **2048 ff:22:f6:90:2b:7c:9f:ed:45:41:df:79:06:de:fe:81 id_rsa_personal (RSA)**
  2048 e7:08:d6:8c:00:28:31:f9:3f:21:4a:0f:4e:1e:ee:20 id_rsa (RSA)
  </code></pre>
  
  <p>I think , ssh-agent is unable to iterate through keys. It only reads first key and stops. 
  Is this a bug in openssh ? If yes, any workaround ? </p>
  
  <p>Thanks </p>