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.
---