git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Multiple Keys in ssh-agent, fail to clone

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 14, 2016, 08:09 UTC
Message-ID
<alpine.DEB.2.20.1607141007230.6426@virtualbox>
In-Reply-To
<CFA91608-1F29-4631-BABC-258404A62A3B@benle.de>
Hi Benjamin,
On Wed, 13 Jul 2016, Benjamin Fritsch wrote:
Show 8 quoted lines
> I have two keys.
> - KeyA (my company that has access to the repository I want to clone)
> - KeyB (just my personal key with access to my personal stuff)
> 
> Having both keys in loaded and listed in `ssh-add -L` fails to clone the
> repository. I tried to change the order of the key in the agent but
> neither KeyA, KeyB nor KeyB, KeyA will work. The only case that works if
> I have KeyA loaded an no other key is added to the ssh-agent.

I once had the same problem, due to a server newly closing the connection directly after the first key failed. Note: the problem was the *server* (that was updated at the same time as my local Debian packages).

The only remedy was to specify the exact key in ~/.ssh/config via IdentityFile.

Hth, Johannes

Previous: Benjamin Fritsch
Message 4 of 4 in “Multiple Keys in ssh-agent, fail to clone”
  1. Benjamin FritschJul 13, 2016
  2. Junio C HamanoJul 13, 2016
  3. Benjamin FritschJul 15, 2016
  4. Johannes SchindelinJul 14, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.