From 0fe1a9e2d2e33f80d807cefc7a23df4a5f760c74 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 2 Nov 2021 12:40:59 +0000 Subject: 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. Signed-off-by: Richard Purdie --- lib/bb/fetch2/git.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/bb') diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 00105183b..d17e2f07b 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -142,6 +142,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 1.2.3-korg