summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-02 12:40:59 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 11:31:50 (GMT)
commitdaf096e295121ea49ebf21f8070e9a6e28f5d46c (patch)
treed256cf4901829063638bf3af5238627cc4631140
parentd88d62c20d7d8da85f02edb170dae0280624ad7e (diff)
downloadpoky-zeus.tar.gz
bitbake: fetch/git: Handle github dropping git:// supportzeus
github is dropping support for git protocol in Git urls. Add code to remap this to https in a way that could be used in older bitbake versions. (Bitbake rev: 7150c8286fba6c4b5ab03d3a74f06e068c9c28c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 82d7325..ac996fa 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -140,6 +140,10 @@ class Git(FetchMethod):
140 ud.proto = 'file' 140 ud.proto = 'file'
141 else: 141 else:
142 ud.proto = "git" 142 ud.proto = "git"
143 if ud.host == "github.com" and ud.proto == "git":
144 # github stopped supporting git protocol
145 # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
146 ud.proto = "https"
143 147
144 if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): 148 if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'):
145 raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) 149 raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)