![](/img/trans.png)
[英]Using credentials for ansible-galaxy with private gitlab repo in a Jenkins Job
[英]Configuring gitlab repo within Jenkins job as SCM
在“ Source Code Management
,我選擇了Git
並指定了以下URL
。
Repository URL: https://gitlab.com/team/repo.git
Failed to connect to repository: Received fatal alert: handshake_failure
[rob@client ~]$ git ls-remote -h git@gitlab.com:team/repo.git HEAD
[rob@client ~]$
我怎么會收到handshake_failure
?
我最終完成了這項工作,請確保您的jenkins用戶可以訪問您的gitlab存儲庫。
例如,將ssh
密鑰上傳到gitlab,然后就可以從jenkins進行克隆了。
Started by user anonymous
Building in workspace /home/rob/.jenkins/jobs/Test/workspace
Cloning the remote Git repository
Cloning repository git@gitlab.com:team/repo.git
> git init /home/rob/.jenkins/jobs/Test/workspace # timeout=10
Fetching upstream changes from git@gitlab.com:team/repo.git
> git --version # timeout=10
> git fetch --tags --progress git@gitlab.com:team/repo.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git@gitlab.com:team/repo.git # timeout=10
> git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url git@gitlab.com:team/repo.git # timeout=10
Fetching upstream changes from git@gitlab.com:team/repo.git
> git fetch --tags --progress git@gitlab.com:team/repo.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 73c78ce6b86711b24aca184fcaa796e00a7a1ece (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 73c78ce6b86711b24aca184fcaa796e00a7a1ece
First time build. Skipping changelog.
Finished: SUCCESS
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.