git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Beat Bolli <dev+git@drbeat.li>
To: juergen.fechter@atos.net
Cc: git@vger.kernel.org, Beat Bolli <dev+git@drbeat.li>,
	Alexander Gavrilov <angavrilov@gmail.com>,
	Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: [PATCH] git-gui: search for all current SSH key types
Date: Sat, 24 Feb 2018 19:39:13 +0100	[thread overview]
Message-ID: <20180224183913.8345-1-dev+git@drbeat.li> (raw)
In-Reply-To: <F65780F29E48994380E2BCE87C6F071101146AB1@DEERLM99EX2MSX.ww931.my-it-solutions.net>

OpenSSH has supported Ed25519 keys since version 6.4 (2014-01-30), and
ECDSA keys since version 5.7 (2011-01-24). git-gui fails to find these
key types in its Help/Show SSH Key dialog.

Teach git-gui to show Ed25519 and ECDSA keys as well.

This was originally reported in
https://github.com/git-for-windows/git/issues/1487 and subseqently in
https://public-inbox.org/git/F65780F29E48994380E2BCE87C6F071101146AB1@DEERLM99EX2MSX.ww931.my-it-solutions.net/

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
Cc: Alexander Gavrilov <angavrilov@gmail.com>
Cc: Pat Thoyts <patthoyts@users.sourceforge.net>

 git-gui/lib/sshkey.tcl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/git-gui/lib/sshkey.tcl b/git-gui/lib/sshkey.tcl
index aa6457bbb..589ff8f78 100644
--- a/git-gui/lib/sshkey.tcl
+++ b/git-gui/lib/sshkey.tcl
@@ -2,7 +2,10 @@
 # Copyright (C) 2006, 2007 Shawn Pearce
 
 proc find_ssh_key {} {
-	foreach name {~/.ssh/id_dsa.pub ~/.ssh/id_rsa.pub ~/.ssh/identity.pub} {
+	foreach name {
+		~/.ssh/id_dsa.pub ~/.ssh/id_ecdsa.pub ~/.ssh/id_ed25519.pub
+		~/.ssh/id_rsa.pub ~/.ssh/identity.pub
+	} {
 		if {[file exists $name]} {
 			set fh    [open $name r]
 			set cont  [read $fh]
-- 
2.15.0.rc1.299.gda03b47c3


      reply	other threads:[~2018-02-24 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 11:21 Issue: Git Gui: show ssh key don't show key type id_ed25519.pub Fechter, Juergen
2018-02-24 18:39 ` Beat Bolli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180224183913.8345-1-dev+git@drbeat.li \
    --to=dev+git@drbeat.li \
    --cc=angavrilov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=juergen.fechter@atos.net \
    --cc=patthoyts@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).