在詹金斯的git结账时面临问题

  • 本文关键字:问题 金斯 git git jenkins
  • 更新时间 :
  • 英文 :


我在Bitbucket上的Jenkins中执行结账时出现以下错误。它早些时候运行良好,但现在出现了错误。配置方面没有任何更改。

Warning: A secret was passed to "checkout" using Groovy String interpolation, which is insecure.
Affected argument(s) used the following variable(s): [bitbucketCreds_PSW, bitbucketCreds]
See https://jenkins.io/redirect/groovy-string-interpolation for details.
The recommended git tool is: NONE
Warning: CredentialId "****" could not be found.
> git rev-parse --resolve-git-dir 
E:JenkinsworkspaceDeployment_PipelinesODI_INC_Deployment_Pipeline@2.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://xyz/abc.git # timeout=10
Using shallow fetch with depth 1
Fetching upstream changes from https://xyz/abc.git
> git --version # timeout=10
> git --version # 'git version 2.27.0.windows.1'
> git fetch --no-tags --force --progress --depth=1 -- https://xyz/abc.git 
+refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://xyz/abc.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1003)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1244)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
at 
org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress --depth=1 -- https://xyz/abc.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: unable to access 'https://xyz/abc.git': Failed to connect to xyz port 443: Timed out

詹金斯阶段步骤:

checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'CloneOption', depth: 1, honorRefspec: true, noTags: true, reference: '', shallow: 
true],
[$class: 'SparseCheckoutPaths',  sparseCheckoutPaths: [[path: 'PQR/Deploy'], [path: 
'Pipelines/Deploy']]]
],
submoduleCfg: [],
userRemoteConfigs: [
[name: 'origin', credentialsId: 'SB_Jira', url: 'https://xyz/abc.git']
]
]

在git-config中添加代理详细信息后,问题得到了解决。

最新更新