Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider


    final PushOperation operation = createPushOperation(calledFromRepoPage);
    if (operation == null)
      return false;
    UserPasswordCredentials credentials = repoPage.getCredentials();
    if (credentials != null)
      operation.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
          credentials.getUser(), credentials.getPassword()));
    final PushOperationResult resultToCompare;
    if (confirmPage.isShowOnlyIfChangedSelected())
      resultToCompare = confirmPage.getConfirmedResult();
    else
View Full Code Here


      int timeout = Activator.getDefault().getPreferenceStore().getInt(
          UIPreferences.REMOTE_CONNECTION_TIMEOUT);
      listRemotesOp = new ListRemoteOperation(local, uri, timeout);
      if (credentials != null)
        listRemotesOp
            .setCredentialsProvider(new UsernamePasswordCredentialsProvider(
                credentials.getUser(), credentials.getPassword()));
      getContainer().run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor)
            throws InvocationTargetException, InterruptedException {
          listRemotesOp.run(monitor);
View Full Code Here

      op = new FetchOperationUI(localDb, repoSelection.getURI(false),
          refSpecPage.getRefSpecs(), timeout, false);

    UserPasswordCredentials credentials = repoPage.getCredentials();
    if (credentials != null)
      op.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
          credentials.getUser(), credentials.getPassword()));

    // even if a RemoteConfig is selected, we need to make sure to
    // add the RefSpecs from the RefSpec page into the FetchOperation
    if (!calledFromRepoPage)
View Full Code Here

        spec.addURIRefUpdates(uri, copyUpdates(updates));
      int timeout = Activator.getDefault().getPreferenceStore().getInt(
          UIPreferences.REMOTE_CONNECTION_TIMEOUT);
      operation = new PushOperation(local, spec, true, timeout);
      if (credentials != null)
        operation.setCredentialsProvider(new UsernamePasswordCredentialsProvider(
            credentials.getUser(), credentials.getPassword()));
      getContainer().run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor)
            throws InvocationTargetException, InterruptedException {
          operation.run(monitor);
View Full Code Here

    String branch = Constants.R_HEADS + SampleTestRepository.FIX;
    CloneOperation cloneOperation = new CloneOperation(new URIish(
        remoteRepository.getUri()), true, null, localRepoPath, branch,
        "origin", 30);
    cloneOperation
        .setCredentialsProvider(new UsernamePasswordCredentialsProvider(
            "agitter", "letmein"));
    cloneOperation.run(null);
    file = new File(localRepoPath, SampleTestRepository.A_txt_name);
    assertTrue(file.exists());
    localRepository = Activator.getDefault().getRepositoryCache()
View Full Code Here

        JGitFlow flow = jGitFlowProvider.gitFlow();

        if (!Strings.isNullOrEmpty(ctx.getPassword()) && !Strings.isNullOrEmpty(ctx.getUsername()))
        {
            flow.getReporter().debugText(getClass().getSimpleName(), "using provided username and password");
            CredentialsProvider.setDefault(new UsernamePasswordCredentialsProvider(ctx.getUsername(), ctx.getPassword()));
        }
        else if (null != System.console())
        {
            flow.getReporter().debugText(getClass().getSimpleName(), "installing ssh console credentials provider");
            CredentialsProvider.setDefault(new ConsoleCredentialsProvider(prompter));
View Full Code Here

        try {
            props.load(in);
        } finally {
            IOUtils.closeQuietly(in);
        }
        return new UsernamePasswordCredentialsProvider(props.getProperty("login"), props.getProperty("oauth"));
    }
View Full Code Here

        } else {
            RuntimeProperties sysprops = runtimeProperties.get();
            username = ZooKeeperUtils.getContainerLogin(sysprops);
            password = ZooKeeperUtils.generateContainerToken(sysprops, curator.get());
        }
        return new UsernamePasswordCredentialsProvider(username, password);
    }
View Full Code Here

            clone.setURI(application.getRepositoryUrl())
                    .setDirectory(fileLocation);
            if (application.getRepositoryEncryptedUserName() != null
                    && application.getRepositoryEncryptedPassword() != null) {
                decryptRepositoryCredentials(application);
                UsernamePasswordCredentialsProvider credentials = new UsernamePasswordCredentialsProvider(application.getRepositoryUserName(),
                        application.getRepositoryPassword());
                clone.setCredentialsProvider(credentials);
            }

            if (application.getRepositoryBranch() != null) {
View Full Code Here

        }
    }

    public JGitFileSystemProvider() {
        loadConfig();
        CredentialsProvider.setDefault( new UsernamePasswordCredentialsProvider( "guest", "" ) );

        if ( DAEMON_ENABLED ) {
            fullHostNames.put( "git", DAEMON_HOST_NAME + ":" + DAEMON_PORT );
        }
        if ( SSH_ENABLED ) {
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.