From 136a02bdbb0afa12ee3ca9cc9adf87d7b8a803b5 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Thu, 13 Feb 2025 09:14:25 +0800 Subject: [PATCH] scm: Fix git clone issue for git+http protocol `git clone` failed if the URL is specified as git+http. git: 'remote-git+http' is not a git command. See 'git --help'. JIRA: RHELCMP-14340 Signed-off-by: Haibo Lin (cherry picked from commit 1a594e4148c409fc5383fd0a4b0e7ba04d13ec1c) --- pungi/wrappers/scm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pungi/wrappers/scm.py b/pungi/wrappers/scm.py index 1ed8bd33..aae5e847 100644 --- a/pungi/wrappers/scm.py +++ b/pungi/wrappers/scm.py @@ -160,6 +160,9 @@ class GitWrapper(ScmBase): if "://" not in repo: repo = "file://%s" % repo + if repo.startswith("git+http"): + repo = repo[4:] + git_cmd = ["git"] if "credential_helper" in self.options: git_cmd.extend(["-c", "credential.useHttpPath=true"])