簡體   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