private void initialize() { if (!this.initialized) { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(Host hc, Session session) { session.setConfig("StrictHostKeyChecking", isStrictHostKeyChecking() ? "yes" : "no"); } }); this.initialized = true; } }
@Override public void configure(Transport transport) { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { session.setConfig("StrictHostKeyChecking", sshUriProperties.isStrictHostKeyChecking() ? "yes" : "no"); } }); } }
public static <T> T useOpenShiftSessionFactory(Callable<T> callable) throws Exception { SshSessionFactory oldFactory = SshSessionFactory.getInstance(); try { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { session.setConfig("StrictHostKeyChecking", "no"); } }); return callable.call(); } finally { SshSessionFactory.setInstance(oldFactory); } } }
private void setupSSH(final BundleContext context) { final ServiceReference ssh; ssh = context.getServiceReference(IJSchService.class.getName()); if (ssh != null) { SshSessionFactory.setInstance(new EclipseSshSessionFactory( (IJSchService) context.getService(ssh))); } }
/** * Initializes SSH authentication */ private void initSSHAuthentication() { SshSessionFactory.setInstance(new CustomJschConfigSessionFactory()); }
private void initialize() { if (!this.initialized) { this.basedir = createTempBasedir(); SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(Host hc, Session session) { session.setConfig("StrictHostKeyChecking", strictHostKeyChecking ? "yes" : "no"); } }); this.initialized = true; } }
public static void setupLocalSsh(String sshDir, boolean noPrompt) { SshSessionFactory.setInstance(new LocalConfigSessionFactory(sshDir, noPrompt)); }
private void setupSSH() { SshSessionFactory.setInstance(new JGitSSHConfigSessionFactory(config)); }
public static void setupSsh(String sshDir) { if(SshSessionFactory.getInstance() == null || !SshSessionFactory.getInstance().getClass().getName().equals(GithubConfigSessionFactory.class.getName())) { log.debug("Setting SSH session factory for ssh dir path {}", sshDir); SshSessionFactory.setInstance(new GithubConfigSessionFactory(sshDir)); } }
@Override public boolean setupSshCredentialsProvider(ReleaseContext ctx, JGitFlowReporter reporter) { if (ctx.isEnableSshAgent()) { reporter.debugText(getClass().getSimpleName(),"installing ssh-agent credentials provider"); SshSessionFactory.setInstance(new SshCredentialsProvider()); return true; } return false; }
JGitAPIImpl(File workspace, TaskListener listener, final PreemptiveAuthHttpClientConnectionFactory httpConnectionFactory) { /* If workspace is null, then default to current directory to match * CliGitAPIImpl behavior */ super(workspace == null ? new File(".") : workspace); this.listener = listener; // to avoid rogue plugins from clobbering what we use, always // make a point of overwriting it with ours. SshSessionFactory.setInstance(new TrileadSessionFactory()); if (httpConnectionFactory != null) { httpConnectionFactory.setCredentialsProvider(asSmartCredentialsProvider()); // allow override of HttpConnectionFactory to avoid JENKINS-37934 HttpTransport.setConnectionFactory(httpConnectionFactory); } }
SshSessionFactory.setInstance( null );
SshSessionFactory.setInstance(new LiveOakSshSessionFactory(passphrase));