繁体   English   中英

如何使用 Jenkins 管道签出特定的标签/提交(git)

[英]how to checkout specific tag/commit (git) with Jenkins pipeline

到目前为止,我在 jenkins 中运行了以下命令:

git branch: branch_nam, url: url, credentialsId: cred

它工作正常。 我试图添加一种方法来检查特定的标签/提交,所以我使用了以下命令:

checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: url]], branches: [[name: tag]]], credentialsId: cred, poll: false

但我收到以下错误:

错误:克隆远程 repo 'origin' hudson.plugins.git.GitException 时出错:命令“git fetch --tags --progress http://codefront:8080/tfs/DefaultCollection/some_folder +refs/heads/ :refs/remotes/ origin/ " 返回状态码 128: stdout: stderr: fatal: http://codefront:8080/tfs/DefaultCollection/some_folder身份验证失败

我做错了什么? 他们每个命令的工作方式有什么区别?

提前致谢

请参阅此处的文档: https ://jenkins.io/doc/pipeline/steps/workflow-scm-step/

jenkins 用户远程配置参数手册

检查您的网址是否尊重它。 如果不是问题,请给我价值。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM