简体   繁体   English

Jenkins中的克隆git存储库不起作用

[英]Clone git repository in Jenkins is not working

I am trying to connect bitbucket Git repository in Jenkins. 我正在尝试连接Jenkins中的bitbucket Git存储库。 I created repository and added two files. 我创建了存储库并添加了两个文件。

I can see two choices, HTTPS SSH 我可以看到两个选择,HTTPS SSH

In my system, I am able to clone my repository by below command, 在我的系统中,我可以通过以下命令克隆存储库,

git clone https://keval1234patel@bitbucket.org/keval1234patel/repo1.git git clone https://keval1234patel@bitbucket.org/keval1234patel/repo1.git

The problem is, When I give same url in Jenkins, it shows below error, 问题是,当我在詹金斯中输入相同的网址时,它显示以下错误,

詹金错误

One more thing I noticed is, In my bitbucket, I don't see clone option as I can see in other articles, I see like below, 我注意到的另一件事是,在我的位桶中,没有看到克隆选项,就像在其他文章中看到的那样,如下所示,

HTTPS网址

When I try to brows URL, it shows me 404 error, But same URL is working for clone repository in local system, I unchecked "This is a private repository" checkbox as well. 当我尝试浏览URL时,它显示404错误, 但是相同的URL对于本地系统中的克隆存储库也有效,因此我也未选中“这是一个私有存储库”复选框。 404

Where do I need to change to integrate my git repository with Jenkins? 我需要在哪里更改以将git存储库与Jenkins集成在一起?

Those, who may have same issue, Need to set git.exe path in Jenkins configuration. 那些可能有相同问题的用户需要在Jenkins配置中设置git.exe路径。

While going in the project--> Configure--> set the path of the git correctly.
It should be till the bin and then append git.exe like *\bin\git.exe

In my case, it is 就我而言

C:\\Program Files\\Git\\bin\\git.exe C:\\ Program Files \\ Git \\ bin \\ git.exe

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

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