private static URIish createURI(Session session) { URIish uri = new URIish(); uri = uri.setScheme("ssh"); //$NON-NLS-1$ uri = uri.setUser(session.getUserName()); uri = uri.setHost(session.getHost()); uri = uri.setPort(session.getPort()); return uri; }
public void modifyText(final ModifyEvent e) { Protocol protocol = getProtocol(); if (protocol != Protocol.HTTP && protocol != Protocol.HTTPS) setURI(uri.setUser(nullString(userText.getText()))); user = userText.getText(); } });
public void modifyText(final ModifyEvent e) { eventDepth++; try { if (eventDepth == 1) { if (pushURI != null) { pushURI = pushURI.setUser(user.getText()); uriText.setText(pushURI.toString()); checkPage(); } } } finally { eventDepth--; } } });
/** * Creates a {@link URIish} from the given remote address and user name. * * @param userName * for the uri * @param remote * address of the remote host * @return the uri, with {@link SshConstants#SSH_SCHEME} as scheme */ public static URIish toURI(String userName, InetSocketAddress remote) { String host = remote.getHostString(); int port = remote.getPort(); return new URIish() // .setScheme(SshConstants.SSH_SCHEME) // .setHost(host) // .setPort(port) // .setUser(userName); }
@Override public URIish getFetchUrl() { return new URIish().setScheme("ssh").setUser("git").setHost("github.com").setPath(props.getProperty(ENV_GITHUB)); }
/** * Constructs ... * * * @param localRepository * @param remoteRepository * @param username * @param password * * * @throws IOException * @throws URISyntaxException */ GitRepositoryClient(File localRepository, String remoteRepository, String username, String password) throws URISyntaxException, IOException { super(localRepository, remoteRepository); uri = new URIish(remoteRepository); if ((username != null) && (password != null)) { uri.setUser(username); uri.setPass(password); credentialsProvider = new UsernamePasswordCredentialsProvider(username, password); } this.repository = new FileRepository(new File(localRepository, Constants.DOT_GIT)); }
private static URIish createURI(Session session) { URIish uri = new URIish(); uri = uri.setScheme("ssh"); //$NON-NLS-1$ uri = uri.setUser(session.getUserName()); uri = uri.setHost(session.getHost()); uri = uri.setPort(session.getPort()); return uri; }
private static URIish createURI(Session session) { URIish uri = new URIish(); uri = uri.setScheme("ssh"); //$NON-NLS-1$ uri = uri.setUser(session.getUserName()); uri = uri.setHost(session.getHost()); uri = uri.setPort(session.getPort()); return uri; }