git-gui: search for all current SSH key types
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Beat Bolli committed
Feb 24, 2018 at 19:39 UTC
6a47fa0efa342daa53c6386538fda313420351a5
1 file changed
+4
-1
lib/sshkey.tcl
+4
-1
@@ -2,7 +2,10 @@
2
# Copyright (C) 2006, 2007 Shawn Pearce
3
4
proc find_ssh_key {} {
5
- foreach name {~/.ssh/id_dsa.pub ~/.ssh/id_rsa.pub ~/.ssh/identity.pub} {
5
+ foreach name {
6
+ ~/.ssh/id_dsa.pub ~/.ssh/id_ecdsa.pub ~/.ssh/id_ed25519.pub
7
+ ~/.ssh/id_rsa.pub ~/.ssh/identity.pub
8
+ } {
9
if {[file exists $name]} {
10
set fh [open $name r]
11
set cont [read $fh]