Skip to content

Commit

Permalink
git-gui: search for all current SSH key types
Browse files Browse the repository at this point in the history
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
git-for-windows#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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
bbolli authored and gitster committed Mar 2, 2018
1 parent 5ab7227 commit 6a47fa0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/sshkey.tcl
Expand Up @@ -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]
Expand Down

0 comments on commit 6a47fa0

Please sign in to comment.