无法连接到存储库:错误执行git命令:git ls -remote -h *** public github url *** head

发布于 2025-02-10 09:07:22 字数 374 浏览 1 评论 0原文

我已经在EC2实例上安装了Jenkins。当我尝试使用EC2实例配置我的公共GitHub repo时,它会抛出错误: *无法连接到存储库:错误执行git git命令:git ls -remote -h ** public github url ***头

我也重新安装了git插件,但它行不通。我也添加了凭据(希望公共git回购不需要)。有可能的解决方案吗?

I have installed jenkins on ec2 instance. when i try to configure my public github repo with the ec2 instance then it throwing the error: *Failed to connect to repository : Error performing git command: git ls-remote -h **public github url *** HEAD
enter image description here

I reinstalled the git plugin as well but it won't work. I added credentials as well(hope not required for public git repo). Any possible solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩心不撩汉 2025-02-17 09:07:22

您是否安装了 git插件在jenkins中?

Have you installed Git plugin in Jenkins?

多像笑话 2025-02-17 09:07:22

使用以下步骤解决的问题

  1. 确保在计算机上安装了git
    对于Windows检查C->程序文件→git→bin→git.exe
    否则下载它
  2. 为git.exe提供了向詹金斯的位置
    Mange Jenkins→工具→GIT安装→GIT可执行的路径
    在通往git可执行文件的路径中,将本地计算机的路径添加到git.ext
    例如:c:\ program Files \ git \ bin

Credits to: https://www.youtube。 com/watch?v = f5qkon50xp8

Problem Solved using the following steps

  1. Make sure git is installed on your Machine
    for Windows check c->Program Files → Git → bin → git.exe
    otherwise download it
  2. Provide a location to git.exe to Jenkins
    Mange Jenkins → Tools → Git installations → Path to Git executable
    in Path to Git executable add the path of your local computer to git.ext
    ex:C:\Program Files\Git\bin

Credits to :https://www.youtube.com/watch?v=F5QKON50xP8

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文