[ 
https://issues.apache.org/jira/browse/NETBEANS-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16186919#comment-16186919
 ] 

ASF GitHub Bot commented on NETBEANS-73:
----------------------------------------

Github user emilianbold commented on a diff in the pull request:

    https://github.com/apache/incubator-netbeans/pull/25#discussion_r141999265
  
    --- Diff: 
git/src/org/netbeans/modules/git/ui/repository/remote/RemoteRepository.java ---
    @@ -853,9 +854,13 @@ protected int getPreferedPanelHeight () {
     
             private String getDefaultIdentityFilePath () {
                 String identityFile = ""; //NOI18N
    -            if (!Utilities.isWindows()) {
    -                identityFile = System.getProperty("user.home") + 
File.separator //NOI18N
    -                        + ".ssh" + File.separator + "id_dsa"; //NOI18N
    +            File sshDir = new File(System.getProperty("user.home"), 
".ssh"); //NOI18N
    +            File rsaKey = new File(sshDir, "id_rsa"); //NOI18N
    +            File dsaKey = new File(sshDir, "id_dsa"); //NOI18N
    +            if (rsaKey.canRead()) {
    +                identityFile = rsaKey.getAbsolutePath();
    +            } else if (dsaKey.canRead()) {
    +                identityFile = dsaKey.getAbsolutePath();
    --- End diff --
    
    This looks OK.


> Git Private Key Setting Could be Smarter
> ----------------------------------------
>
>                 Key: NETBEANS-73
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-73
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: versioncontrol - Git
>    Affects Versions: 8.2
>            Reporter: Laszlo Kishalmi
>            Priority: Trivial
>              Labels: easyfix, patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I guess it is more common to use {{id_rsa}} keys nowadays than {{id_dsa}}. 
> Whenever I clone a repository that I use with ssh, I need to click on private 
> key authentication then browse, and the browse select {{id_dsa}} which I do 
> not have and I have to select my {{id_rsa}} file and close.
> It would be much nicer to pre-fill the input field with the user's {{id_rsa}} 
> or {{id_dsa}} whatever they have ({{id_rsa}} preferred).
> Also this could be done on Windows (where {{id_dsa}} not selected in the Open 
> File dialog) as well as several Windows Git client uses 
> {{%HOME%\.ssh\id_rsa}} as default. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to