将我的存储库位置输入到新作业的“源代码管理 > Git > 存储库 URL”部分时出现错误。我四处搜索并尝试了许多不同的 URL,但都没有成功。
错误:
Failed to connect to repository : Error performing command: git ls-remote -h https://github.com/micdoodle8/Crossbow_Mod_2.git HEAD
有什么想法吗?谢谢。
最佳答案
您可能需要在 Manage Jenkins -> Configure System -> Git -> Git Installations -> Path to Git executable 中设置 git 可执行文件的路径。
例如,我在 Windows 中遇到了同样的错误。我用 chocolatey 安装了 git,并通过 Powershell 获取了位置:
Get-Command git.exe | Select Definition
在 Unix 中,您应该能够:
which git
关于git - "Failed to connect to repository"设置 Github Jenkins 插件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12681308/