/** * Get the default SSH session * * @return a remote session * @throws org.eclipse.jgit.errors.TransportException * in case of error with opening SSH session */ protected RemoteSession getSession() throws TransportException { if (sock != null) return sock; final int tms = getTimeout() > 0 ? getTimeout() * 1000 : 0; final FS fs = local == null ? FS.detect() : local.getFS(); sock = sch .getSession(uri, getCredentialsProvider(), fs, tms); return sock; }
MessageWriter stderr = new MessageWriter(); try (MessageWriter stdout = new MessageWriter()) { session = SshSessionFactory.getInstance().getSession(sshUri, provider, fs, 1000 * timeout); process = session.exec(command, 0);
/** * Get the default SSH session * * @return a remote session * @throws TransportException * in case of error with opening SSH session */ protected RemoteSession getSession() throws TransportException { if (sock != null) return sock; final int tms = getTimeout() > 0 ? getTimeout() * 1000 : 0; final FS fs = local == null ? FS.detect() : local.getFS(); sock = sch .getSession(uri, getCredentialsProvider(), fs, tms); return sock; }
/** * Get the default SSH session * * @return a remote session * @throws org.eclipse.jgit.errors.TransportException * in case of error with opening SSH session */ protected RemoteSession getSession() throws TransportException { if (sock != null) return sock; final int tms = getTimeout() > 0 ? getTimeout() * 1000 : 0; final FS fs = local == null ? FS.detect() : local.getFS(); sock = sch .getSession(uri, getCredentialsProvider(), fs, tms); return sock; }
MessageWriter stderr = new MessageWriter(); try (MessageWriter stdout = new MessageWriter()) { session = SshSessionFactory.getInstance().getSession(sshUri, provider, fs, 1000 * timeout); process = session.exec(command, 0);