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:31:04 +0000 |
commit | af479e239d1e4dc93f0162c5936369a94c1c529d (patch) | |
tree | bab96d82d3d4bfff82ced87580d5bfefe1f761b7 | |
parent | b4860b292406698f3c8af9a3708a09df21c96300 (diff) | |
download | bitbake-1.42.tar.gz |
fetch/git: Handle github dropping git:// support1.42
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>
-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 7adf2c4de..b573b11d0 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) |