git - "Failed to connect to repository"设置 Github Jenkins 插件时出错

标签 git github jenkins

将我的存储库位置输入到新作业的“源代码管理 > 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/

相关文章:

java - Docker 客户端 Java API : The server failed to respond with a valid HTTP response

git - 如何将我的更改推送回 git 中的源代码

reactjs - 在github上发布react应用程序后出现空白页面

gradle - 为什么当我对 gradle 项目使用 github actions CI 时,我会遇到 "./gradlew: Permission denied"错误?

java - 无法将 git 的标签推送到远程作为 Maven 发布过程

jenkins - 如何在 Jenkins 开始重建?

git推送到本地硬盘存储库需要ssh吗? (赛格温)

git - 使用 git 查看对特定文件的未提交更改

python - 如何从 Python 中调用 'git pull'?

git - Jenkins checkout GIT 项目失败,权限被拒绝致命 : unable to fork