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:46 +0000 |
commit | f19eefdaa5b43460f00d79d002f96112a6aa3c9a (patch) | |
tree | 47c0d2a807090fdfe670673d2a2921e592a6407c | |
parent | 692fa35f4c23722f3179502cb965960cc230e709 (diff) | |
download | bitbake-f19eefdaa5b43460f00d79d002f96112a6aa3c9a.tar.gz |
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 <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 e8ddf2c76..0a708ac85 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) |