结帐Bitbucket Repo Branch in Jenkins
我是詹金斯(Jenkins)的新手,并尝试创建一条管道并从詹金斯(Jenkins)结帐私人位桶存储库,然后安装依赖项,然后创建构建。
但是我在结帐存储库分支时在第一步中出现问题。
我也设置了凭据和SSH链接。
这是错误:
The recommended git tool is: NONE
using credential 02cb4299-3a20-424f-a541-1771e5b2e0b9
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe rev-parse --resolve-git-dir C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\SCM-Pipline\.git # timeout=10
Fetching changes from the remote Git repository
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe config remote.origin.url ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/ # timeout=10
Fetching upstream changes from ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe --version # timeout=10
git --version # 'git version 2.37.0.windows.1'
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe fetch --tags --force --progress -- ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/ +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
这是代码:
pipeline {
agent any
stages {
stage('Git Checkout') {
steps {
git branch: 'master',
credentialsId: '<credentialIdsHere>', // changed
url: 'ssh://[email protected]:company/repo.git/' // changed
}
}
}
}
我也指定了git.exe路径
I am new with Jenkins and trying to create a pipeline and checkout the private BitBucket repository from Jenkins and then install dependencies and then create build.
But I am having issue in the first step while checkout the repository branch.
I have set the credentials and SSH link as well.
Here is the Error:
The recommended git tool is: NONE
using credential 02cb4299-3a20-424f-a541-1771e5b2e0b9
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe rev-parse --resolve-git-dir C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\SCM-Pipline\.git # timeout=10
Fetching changes from the remote Git repository
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe config remote.origin.url ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/ # timeout=10
Fetching upstream changes from ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe --version # timeout=10
git --version # 'git version 2.37.0.windows.1'
C:\Users\ahsan.alam\AppData\Local\Programs\Git\bin\git.exe fetch --tags --force --progress -- ssh:///[email protected]:Arsalanakhtar123/etisalat-jenkins.git/ +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
Here is the code:
pipeline {
agent any
stages {
stage('Git Checkout') {
steps {
git branch: 'master',
credentialsId: '<credentialIdsHere>', // changed
url: 'ssh://[email protected]:company/repo.git/' // changed
}
}
}
}
Also I have specify the git.exe path
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设SSH正在起作用,这意味着您可以手动执行
git ls-remote
(例如)到该ssh url,我建议使用语法(对于所述ssh url):Assuming SSH is working, meaning you can execute manually a
git ls-remote
(for instance) to that SSH URL, I would recommend the syntax (for said SSH URL):