summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-02 12:40:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-03 11:31:37 +0000
commit264a1c06d4b3235ffdbd08508ac5569686448ffc (patch)
treecc23bf2ae4f5a6e75da886cbab444dffdb413d64
parentb0a2adf311bac27933c71cba8d444deffdd516c5 (diff)
downloadpoky-264a1c06d4b3235ffdbd08508ac5569686448ffc.zip
poky-264a1c06d4b3235ffdbd08508ac5569686448ffc.tar.gz
poky-264a1c06d4b3235ffdbd08508ac5569686448ffc.tar.bz2
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.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 21ef85a..f2cc022 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -141,6 +141,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)