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:58 +0000 |
commit | 6c5a847a4514b8c1729511aae96374eb8679a152 (patch) | |
tree | 821655f253a6ac57936412f1ebd47d249a5f03b9 /bitbake | |
parent | 2faacaf8f4bf5afff9dab8d9164a83788465224f (diff) | |
download | poky-thud.tar.gz |
bitbake: fetch/git: Handle github dropping git:// supportthud
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: 964958b8b11dc69fb289fc6c97c1dbc8d76ad0f8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 b5d6f99de2..0f215de644 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -152,6 +152,10 @@ class Git(FetchMethod): | |||
152 | ud.proto = 'file' | 152 | ud.proto = 'file' |
153 | else: | 153 | else: |
154 | ud.proto = "git" | 154 | ud.proto = "git" |
155 | if ud.host == "github.com" and ud.proto == "git": | ||
156 | # github stopped supporting git protocol | ||
157 | # https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git | ||
158 | ud.proto = "https" | ||
155 | 159 | ||
156 | if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): | 160 | if not ud.proto in ('git', 'file', 'ssh', 'http', 'https', 'rsync'): |
157 | raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) | 161 | raise bb.fetch2.ParameterError("Invalid protocol type", ud.url) |