summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-02 12:40:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 11:31:26 +0000
commitc64df461cb63c4a2801a8c8c55ac095732748a27 (patch)
treeea73329fc400d1f2708e2a9d831e4f2d5f2e5df3 /bitbake
parentd978d52b0da17fb94579a069a0e845c38c7c942b (diff)
downloadpoky-c64df461cb63c4a2801a8c8c55ac095732748a27.tar.gz
bitbake: fetch/git: Handle github dropping git:// support
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: 0fe1a9e2d2e33f80d807cefc7a23df4a5f760c74) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 00105183b7..d17e2f07b8 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -142,6 +142,10 @@ class Git(FetchMethod):
142 ud.proto = 'file' 142 ud.proto = 'file'
143 else: 143 else:
144 ud.proto = "git" 144 ud.proto = "git"
145 if ud.host == "github.com" and ud.proto == "git":
146 # github stopped supporting git protocol
147 # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
148 ud.proto = "https"
145 149
146 if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): 150 if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'):
147 raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) 151 raise bb.fetch2.ParameterError("Invalid protocol type", ud.url)