to use the path url-compatible. This needs to happen before the shell quotation happens. Without this commit, spaces in the clone URL will be used as " " and not as "%20" which will fail. This commit changes the " " in the URL to "%20" when it is a http or https url. Signed-off-by: Thilo Cestonaro --- lib/bb/fetch2/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 578edc59..dc7f848d 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -66,6 +66,7 @@ import re import shlex import subprocess import tempfile +import urllib import bb import bb.progress from contextlib import contextmanager @@ -697,7 +698,12 @@ class Git(FetchMethod): username = ud.user + '@' else: username = "" - return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path) + + path = ud.path + if ud.proto in [ 'http', 'https' ]: + path = urllib.parse.quote(ud.path) + + return "%s://%s%s%s" % (ud.proto, username, ud.host, path) def _revision_key(self, ud, d, name): """ -- 2.37.2