using .gitcredentials to set credentials > /opt/rh/devtoolset-2/root/usr/bin/git config --local credential.username ********* # timeout=10 > /opt/rh/devtoolset-2/root/usr/bin/git config --local credential.helper store --file=/tmp/git8500404327159234501.credentials # timeout=10
node {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'cec6ad4c-a6c4-49ba-b7ba-95aace163002', passwordVariable: 'TOKEN', usernameVariable: 'USR']]) {
git url: "https://${env.USR}:${env.TOKEN}@github.com/myuser/myrepo.git"
}
}[Pipeline] git > /opt/rh/devtoolset-2/root/usr/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > /opt/rh/devtoolset-2/root/usr/bin/git config remote.origin.url https://****:****@github.com/myuser/myrepo.git # timeout=10 Fetching upstream changes from https://****@github.com/afsadev/debt-agreement.git > /opt/rh/devtoolset-2/root/usr/bin/git --version # timeout=10 Setting http proxy: serverproxy:8080 > /opt/rh/devtoolset-2/root/usr/bin/git -c core.askpass=true fetch --tags --progress https://****@github.com/myuser/myrepo.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from https://****@github.com/myuser/myrepo.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097) 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:49) at hudson.security.ACL.impersonate(ACL.java:213) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "/opt/rh/devtoolset-2/root/usr/bin/git -c core.askpass=true fetch --tags --progress https://****@github.com/myuser/myrepo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: stderr: remote: Invalid username or password.