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

Re: [JGIT PATCH 1/2] Ignore unreadable SSH private keys when autoloading identities

From
MZMarek Zawirski <marek.zawirski@gmail.com>
Date
Aug 27, 2008, 23:26 UTC
Message-ID
<48B5E2A1.3030007@gmail.com>
In-Reply-To
<1219878126-18622-1-git-send-email-spearce@spearce.org>
Shawn O. Pearce wrote:
> diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/DefaultSshSessionFactory.java b/org.spearce.jgit/src/org/spearce/jgit/transport/DefaultSshSessionFactory.java
(...)
Show 7 quoted lines
> +			try {
> +				addIdentity(k);
> +			} catch (JSchException e) {
> +				if (e.getMessage().startsWith("invalid privatekey: "))
> +					continue;
> +				throw e;
> +			}

That's extreme error handling with JSch;) Do you really think it's better to rely on internal error message instead of continuing in any case? Which other exceptions we would like to pass level up?

-- 
Marek Zawirski [zawir]
marek.zawirski@gmail.com
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 3 of 5 in “Ignore unreadable SSH private keys when autoloading identities”
  1. 1/2 Ignore unreadable SSH private keys when autoloading identitiesShawn O. Pearce, Aug 27, 2008
  2. 2/2 pgm.push: Ensure SSH connections are closedShawn O. Pearce, Aug 27, 2008
  3. Marek ZawirskiAug 27, 2008
  4. Shawn O. PearceAug 27, 2008
  5. 1/2 Ignore unreadable SSH private keys when autoloading identitiesShawn O. Pearce, Aug 28, 2008

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.