summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 59a2ee8f80..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)
@@ -363,7 +367,7 @@ class Git(FetchMethod):
363 runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) 367 runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir)
364 368
365 runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir) 369 runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir)
366 fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl) 370 fetch_cmd = "LANG=C %s fetch -f --progress %s refs/*:refs/*" % (ud.basecmd, repourl)
367 if ud.proto.lower() != 'file': 371 if ud.proto.lower() != 'file':
368 bb.fetch2.check_network_access(d, fetch_cmd, ud.url) 372 bb.fetch2.check_network_access(d, fetch_cmd, ud.url)
369 progresshandler = GitProgressHandler(d) 373 progresshandler = GitProgressHandler(d)