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:37 +0000 |
commit | 264a1c06d4b3235ffdbd08508ac5569686448ffc (patch) | |
tree | cc23bf2ae4f5a6e75da886cbab444dffdb413d64 | |
parent | b0a2adf311bac27933c71cba8d444deffdd516c5 (diff) | |
download | poky-264a1c06d4b3235ffdbd08508ac5569686448ffc.tar.gz |
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: 44320ce7a2bfd5126de2f83a1a1102a3e4485f69)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 21ef85a2ae..f2cc02258e 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -141,6 +141,10 @@ class Git(FetchMethod): | |||
141 | ud.proto = 'file' | 141 | ud.proto = 'file' |
142 | else: | 142 | else: |
143 | ud.proto = "git" | 143 | ud.proto = "git" |
144 | if ud.host == "github.com" and ud.proto == "git": | ||
145 | # github stopped supporting git protocol | ||
146 | # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git | ||
147 | ud.proto = "https" | ||
144 | 148 | ||
145 | if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): | 149 | if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): |
146 | raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) | 150 | raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) |