hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128: stdout: stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. fatal: Authentication failed for 'https://bitbucket.org/XXXX/xxxxx.git/'

Jenkins JIRA | John Stephenson | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When using the mutlibranch indexing I can't connect to bitbucket due to the credentials not being used correctly. I've setup credentials for the repository and can create a single branch project that connects and pulls correctly (see the end of this description). The output from the multibranch indexing job is below. > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to https://bitbucket.org/XXXX/xxxxx.git > git config remote.origin.url https://bitbucket.org/XXXX/xxxxx.git # timeout=10 Fetching & pruning origin... Fetching upstream changes from origin > git --version # timeout=10 > git -c core.askpass=true fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune FATAL: Failed to recompute children of test hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128: stdout: stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. fatal: Authentication failed for 'https://bitbucket.org/XXXX/xxxxx.git/' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:293) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:148) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE ---------------- As mentioned, if I run a (different) single branch project job against the same repo on the same machine I get: ln -s builds/lastSuccessfulBuild /var/jenkins_home/jobs/bosh/lastSuccessful failed: 71 Protocol error ln -s builds/lastStableBuild /var/jenkins_home/jobs/bosh/lastStable failed: 71 Protocol error Cloning the remote Git repository Cloning repository https://bitbucket.org/XXXX/xxxxx.git > git init /var/jenkins_home/workspace/bosh@script # timeout=10 Fetching upstream changes from https://bitbucket.org/XXXX/xxxxx.git > git --version # timeout=10 *using .gitcredentials to set credentials* > git config --local credential.username XXXX# timeout=10 > git config --local credential.helper store --file=/tmp/git7209450783850968846.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://bitbucket.org/XXXX/xxxxx.git +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git config remote.origin.url https://bitbucket.org/XXXX/xxxxx.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://bitbucket.org/XXXX/xxxxx.git # timeout=10 Fetching upstream changes from https://bitbucket.org/XXXX/xxxxx.git ..... blah blah blah and it completes successfully. Note the use of .gitcredentials which is missing from the multibranch indexing builds. ------------- I could just run the steps manually on the machine but that's not great and feels like it should be unnecessary. Any ideas?

    Jenkins JIRA | 7 months ago | John Stephenson
    hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128: stdout: stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. fatal: Authentication failed for 'https://bitbucket.org/XXXX/xxxxx.git/'
  2. 0

    [JIRA] (JENKINS-38092) workflow-multibranch plugin doesn't use credentials when indexing the branches

    Google Groups | 7 months ago | john_step...@hotmail.com (JIRA)
    hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress origin +refs/heads/<b>:refs/remotes/origin/</b> --prune" returned status code 128:<br> stdout: <br> stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.<br> fatal: Authentication failed for 'https://bitbucket.org/XXXX/xxxxx.git/'</p> <p style="margin-top:0;margin-bottom:10px;; margin: 10px 0 0 0">
  3. 0

    Multibranch Pipeline Not Honoring Git Timeout During Branch Indexing

    Google Groups | 5 months ago | David Johnson
    hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 143: fatal: The remote end hung up unexpectedly fatal: early EOF
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] (JENKINS-37880) Starting, stopping and replaying a run in quick succession does not work

    Google Groups | 7 months ago | jdu...@cloudbees.com (JIRA)
    hudson.plugins.git.GitException: Failed to fetch from https:<span class="code-comment" style="color: #808080">//github.com/i386/app-store-demo.git </span> at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
  6. 0

    Jenkins fails to check out files stored on EFS using Git

    GitHub | 7 months ago | matsev
    hudson.plugins.git.GitException: Failed to fetch from https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sample_repo

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git -c core.askpass=true fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128: stdout: stderr: remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile. fatal: Authentication failed for 'https://bitbucket.org/XXXX/xxxxx.git/'

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl$1.execute
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1740)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
      4 frames
    3. jenkins.plugins.git
      AbstractGitSCMSource.retrieve
      1. jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:293)
      1 frame
    4. jenkins.scm.api
      SCMSource.fetch
      1. jenkins.scm.api.SCMSource.fetch(SCMSource.java:148)
      1 frame
    5. jenkins.branch
      MultiBranchProject.computeChildren
      1. jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
      1 frame
    6. com.cloudbees.hudson
      FolderComputation.run
      1. com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
      2. com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
      2 frames
    7. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:98)
      2. hudson.model.Executor.run(Executor.java:410)
      2 frames