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:30:57 +0000
commitc222eddcebe892ae209aea7776cfc1147ac1df6e (patch)
tree5e9ff4a2d1df2eb838e863aaa8366b91a1f031b4
parentc5b8a2fce98c362ea77d74a8bc472d01b739a98a (diff)
downloadbitbake-c222eddcebe892ae209aea7776cfc1147ac1df6e.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.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 000aee190..f6f6b63a7 100644
--- a/lib/bb/fetch2/git.py
+++ b/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)