zuojianwei2020 流水线阶段一拉取源代码 (Checkout SCM)报错 No credentials specified Cloning the remote Git repository Cloning repository https://github.com/kubesphere/devops-java-sample.git git init /home/jenkins/agent/workspace/demo-dev7ljz6/pipeline-dev # timeout=10 Fetching upstream changes from https://github.com/kubesphere/devops-java-sample.git git –version # timeout=10 git fetch –tags –progress https://github.com/kubesphere/devops-java-sample.git +refs/heads/:refs/remotes/origin/ ERROR: Error cloning remote repo ‘origin’ hudson.plugins.git.GitException: Command “git fetch –tags –progress https://github.com/kubesphere/devops-java-sample.git +refs/heads/:refs/remotes/origin/” returned status code 128: stdout: stderr: remote: Enumerating objects: 1, done.
lxj Feynman 老哥我遇到了一个问题,能帮我看看吗 问题是:建立多分支流水线,在扫描仓库这一步,就报错:连接仓库超时。如下图所示: 代码仓库是 gitee.com 我master节点所属的服务器,可以执行 git clone命令直接 将代码拉取到本地。拉取 过程,如下图所示 但是在devops中, 我 创建了 代码仓库。 url ,用的 是图中的所框的url 凭证 是我自己的登录gitee用的账户和密码,如下图。
FlywinNing withCredentials([usernamePassword(credentialsId: “$GITHUB_CREDENTIAL_ID”, passwordVariable: ‘GIT_PASSWORD’, usernameVariable: ‘GIT_USERNAME’)]) { sh ‘git config –global user.email “kubesphere@yunify.com” ’ sh ‘git config –global user.name “kubesphere” ’ sh ‘git tag -a $TAG_NAME -m “$TAG_NAME” ’ sh ‘git push http://$GIT_USERNAME:$GIT_PASSWORD@github.com/$GITHUB_ACCOUNT/devops-java-sample.git –tags –ipv4′ 这里user.email和user.name改成我自己的了,push的时候还认证失败了