vieiro commented on a change in pull request #3713:
URL: https://github.com/apache/netbeans/pull/3713#discussion_r820138218
##########
File path:
ide/libs.git/src/org/netbeans/libs/git/jgit/JGitSshSessionFactory.java
##########
@@ -167,9 +177,25 @@ protected Session createSession (Host hc, String user,
String host, int port, FS
private boolean setupJSchIdentityRepository (JSch jsch, String
identityFile, boolean preferAgent) throws JSchException {
boolean agentUsed = false;
if (preferAgent) {
- Connector con =
ConnectorFactory.getInstance().createConnector(ConnectorFactory.ConnectorKind.ANY);
- if (con != null) {
- IdentityRepository irepo = new IdentityRepositoryImpl(con);
+ AgentConnector agentConnector = null;
+ try {
+ agentConnector = new SSHAgentConnector();
+ if(! agentConnector.isAvailable()) {
+ agentConnector = null;
+ }
+ } catch (Throwable ex) {
+ LOG.log(Level.FINE, null, ex);
+ }
+ try {
+ agentConnector = new PageantConnector();
Review comment:
Why create a new "PageantConnector()" on line 190 if we've already
created a SSHAgentConnector on line 182 above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists