Skip to content

Instantly share code, notes, and snippets.

@gregsymons
Last active October 18, 2017 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregsymons/f740041876e457531f0471f1c898f373 to your computer and use it in GitHub Desktop.
Save gregsymons/f740041876e457531f0471f1c898f373 to your computer and use it in GitHub Desktop.
weird jenkins checkout failure
Started by user gsymons-affinipay
Replayed #19
[Pipeline] node
Running on packer-agent-1 in /var/lib/jenkins/workspace/afp-linux-baselines_master-PBMLR7ZY2MEISKL2TLSAA2SJ4SZQFMPRJKXFCSCY7433FPPCTAFQ
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] echo
Checking out master@https://bitbucket.org/affinipay/afp-linux-baselines.git credentials id AffinipayCI
[Pipeline] echo
user remote configs: [+refs/heads/master:refs/remotes/origin/master => https://bitbucket.org/affinipay/afp-linux-baselines.git (origin)]
[Pipeline] checkout
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://bitbucket.org/affinipay/afp-linux-baselines.git # timeout=10
Fetching upstream changes from https://bitbucket.org/affinipay/afp-linux-baselines.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://bitbucket.org/affinipay/afp-linux-baselines.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.org/affinipay/afp-linux-baselines.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://bitbucket.org/affinipay/afp-linux-baselines.git +refs/heads/*:refs/remotes/origin/*" 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/affinipay/afp-linux-baselines.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at ......remote call to packer-agent-1(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:830)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
at sun.reflect.GeneratedMethodAccessor478.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
at com.sun.proxy.$Proxy117.execute(Unknown Source)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:815)
... 13 more
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
#!/usr/bin/env groovy
node('packer') {
stage('Checkout') {
multibranchCheckout(scm, env.BRANCH_NAME)
}
}
def multibranchCheckout(scm, branch) {
def scmUrl = scm.getUserRemoteConfigs()[0].getUrl()
def scmCredentialsId = scm.getUserRemoteConfigs()[0].getCredentialsId()
echo "Checking out ${branch}@${scmUrl} credentials id ${scmCredentialsId}"
echo "user remote configs: ${scm.getUserRemoteConfigs()}"
checkout([$class: 'GitSCM',
branches: [[name: branch]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: false,
recursiveSubmodules: true,
reference: '',
trackingSubmodules: false]],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: scmCredentialsId, url: scmUrl]]])
}
Started by user gsymons-affinipay
Replayed #9
[Pipeline] node
Running on JenkinsSlave1 in /home/jenkins/jenkins_slave/workspace/afp-linux-baselines_master-PBMLR7ZY2MEISKL2TLSAA2SJ4SZQFMPRJKXFCSCY7433FPPCTAFQ
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Checkout)
[Pipeline] echo
Checking out https://bitbucket.org/affinipay/afp-linux-baselines.git String with credentials id AffinipayCI
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://bitbucket.org/affinipay/afp-linux-baselines.git
> git init /home/jenkins/jenkins_slave/workspace/afp-linux-baselines_master-PBMLR7ZY2MEISKL2TLSAA2SJ4SZQFMPRJKXFCSCY7433FPPCTAFQ # timeout=10
Fetching upstream changes from https://bitbucket.org/affinipay/afp-linux-baselines.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://bitbucket.org/affinipay/afp-linux-baselines.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url https://bitbucket.org/affinipay/afp-linux-baselines.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://bitbucket.org/affinipay/afp-linux-baselines.git # timeout=10
Fetching upstream changes from https://bitbucket.org/affinipay/afp-linux-baselines.git
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://bitbucket.org/affinipay/afp-linux-baselines.git +refs/heads/master:refs/remotes/origin/master
> git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 3ae037ccb5ce52a4dd8e07c767e91f40333591dd (origin/master)
Commit message: "DEVOPS-431: Add a Jenkinsfile"
> git config core.sparsecheckout # timeout=10
> git checkout -f 3ae037ccb5ce52a4dd8e07c767e91f40333591dd
First time build. Skipping changelog.
[Bitbucket] Notifying commit build result
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
Finished: SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment