From daf096e295121ea49ebf21f8070e9a6e28f5d46c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 2 Nov 2021 12:40:59 +0000 Subject: 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: 7150c8286fba6c4b5ab03d3a74f06e068c9c28c8) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 82d7325188..ac996fa166 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -140,6 +140,10 @@ class Git(FetchMethod): ud.proto = 'file' else: ud.proto = "git" + if ud.host == "github.com" and ud.proto == "git": + # github stopped supporting git protocol + # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git + ud.proto = "https" if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) -- cgit v1.2.3-54-g00ecf