diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-02 12:40:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-03 11:30:49 +0000 |
commit | 0fe1a9e2d2e33f80d807cefc7a23df4a5f760c74 (patch) | |
tree | 349a6f3fc8c9578ad3cdfb22108d4844e4c92ba3 /lib/bb | |
parent | 7f3fd1f47f7972756b9b39b6c5ab25084fb4212c (diff) | |
download | bitbake-0fe1a9e2d2e33f80d807cefc7a23df4a5f760c74.tar.gz |
fetch/git: Handle github dropping git:// supportyocto-3.3.42021-04.4-hardknott1.50.4
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/fetch2/git.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |