简体   繁体   English

Windows 10 Jenkins管道无法连接到存储库

[英]Windows 10 Jenkins Pipeline Failed to connect to repository

I am getting started learning Jenkins and am following this "simple" tutorial found within the Jenkins documentation; 我在开始学习詹金斯和我下面这个詹金斯文档中发现的“简单”的教程; it's a tutorial which goes through how to get a simple java-maven-jenkins setup working locally. 这是一个教程,介绍了如何获取在本地工作的简单java-maven-jenkins设置。 I followed the tutorial instructions carefully and have gotten the needed git repository forked and cloned for myself as well as Jenkins started on my localhost, but I ran into a wall when I reached this part: 我认真地按照教程的说明进行操作,并为自己创建了所需的git存储库,并对其进行了克隆,以及Jenkins在本地主机上启动,但是到了这一部分时,我遇到了麻烦:

Create your Pipeline project in Jenkins where on step 8: 在Jenkins创建您的Pipeline项目 ,在第8步中:

"In the Repository URL field, specify the directory path of your locally cloned repository above, which is from your user account/home directory on your host machine, mapped to the /home directory of the Jenkins container - ie “在“存储库URL”字段中,指定上面本地克隆的存储库的目录路径,该目录路径来自主机上的用户帐户/主目录,映射到Jenkins容器的/ home目录,即

For macOS - /home/Documents/GitHub/simple-java-maven-app 对于macOS-/ home / Documents / GitHub / simple-java-maven-app

For Linux - /home/GitHub/simple-java-maven-app 对于Linux-/ home / GitHub / simple-java-maven-app

For Windows - /home/Documents/GitHub/simple-java-maven-app" 对于Windows-/ home / Documents / GitHub / simple-java-maven-app“

I am using Windows 10 with GitHub Desktop and made sure that the repository was in the required place following the tutorial, but when I try to put the Repository URL as /home/Documents/GitHub/simple-java-maven-app (as the tutorial is asking to do), I get the following error within Jenkins: 我将Windows 10与GitHub Desktop结合使用,并确保该存储库位于本教程之后的必需位置,但是当我尝试将存储库URL放置为/ home / Documents / GitHub / simple-java-maven-app(作为教程要求这样做),我在Jenkins中收到以下错误: 无法连接到存储库:命令“ git ls-remote -h / home / Documents / GitHub / simple-java-maven-app HEAD”返回状态码128:stdout:stderr:致命:'/ home / Documents / GitHub / simple -java-maven-app'似乎不是致命的git存储库:无法从远程存储库读取。请确保您具有正确的访问权限,并且存储库存在。

I tried searching for others with the same problem but could only find something related to solving problems with Unix-systems. 我尝试搜索其他具有相同问题的人,但只能找到与解决Unix系统问题有关的东西。

This question I found has a similar problem encountered, but I was not able to solve this problem on my system, as it focuses on Unix systems as well. 这个问题 ,我发现有遇到过类似的问题,但我没能解决我的系统上这个问题,因为它侧重于Unix系统也是如此。

Another weirdness (to my eyes) was that Jenkins asks for the remote repository URL according to the help button, but the tutorial insists to put the local repository as the URL. (在我看来)另一个怪异的是,詹金斯根据帮助按钮要求提供远程存储库URL,但是本教程坚持将本地存储库作为URL。 As I am very new with Jenkins, it would be much appreciated if someone could enlighten me how to fix this to be able to finish the tutorial. 由于我对Jenkins刚起步,因此如果有人能启发我如何解决此问题以完成本教程,将不胜感激。 Also because I am new with Jenkins, I hope who ever can help can really try to explain the solution in layman terms. 另外,因为我对詹金斯(Jenkins)并不陌生,所以我希望能够提供帮助的人真的可以尝试以外行的方式解释解决方案。

Cheers 干杯

Instead of using %HOMEPATH% in docker run command use c:\\Users\\ for mounting volume. 而不是在docker run命令中使用%HOMEPATH%,而使用c:\\​​ Users \\来安装卷。 After that docker will ask you permission allow it and enter your password. 之后,泊坞窗将询问您允许的权限并输入密码。 it will work. 它会工作。

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

相关问题 git 的包装器,用于 jenkins 管道,在 windows 10 ZAB63A76362C3972AC83D5CB88 上 - wrapper for git, for jenkins pipeline, on windows 10 jenkins slave Jenkins 无法连接到存储库:命令返回状态代码 128: - Jenkins Failed to connect to repository : Command returned status code 128: 从Jenkins管道调用Docker容器,该管道在Windows上也作为Docker容器在Docker上运行(对于Windows 10) - Invoke docker container from Jenkins pipeline which is also running as docker container on Windows for docker (for Windows 10) 在Windows 10上使用Mail :: Sendmail模块连接到本地主机失败 - Connect to localhost failed using Mail::Sendmail module on Windows 10 为什么我无法在 windows 10 中运行的 jenkins 管道中运行批处理文件? - why am I not able to run batch file in jenkins pipeline running in windows 10? Windows10 WSL2 “gpg:无法连接到代理:IPC 连接调用失败” - Windows10 WSL2 “gpg: can't connect to the agent: IPC connect call failed” Jenkins与私人GitHub存储库不兼容(Windows) - Jenkins not playing nice with a private GitHub repository (Windows) 在Windows 10上连接到BLE外围设备 - Connect to BLE peripheral on Windows 10 连接到BLE外设Windows 10 - Connect to BLE peripheral Windows 10 将浏览器同步连接到 Windows 10 - Connect Browser Sync to windows 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM