summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/git.py6
-rw-r--r--bitbake/lib/bb/fetch2/wget.py2
2 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index b59a7cdc84..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)
@@ -389,7 +393,7 @@ class Git(FetchMethod):
389 tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR')) 393 tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR'))
390 try: 394 try:
391 # Do the checkout. This implicitly involves a Git LFS fetch. 395 # Do the checkout. This implicitly involves a Git LFS fetch.
392 self.unpack(ud, tmpdir, d) 396 Git.unpack(self, ud, tmpdir, d)
393 397
394 # Scoop up a copy of any stuff that Git LFS downloaded. Merge them into 398 # Scoop up a copy of any stuff that Git LFS downloaded. Merge them into
395 # the bare clonedir. 399 # the bare clonedir.
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index e6d9f528d0..83acd85bae 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -316,7 +316,7 @@ class Wget(FetchMethod):
316 except (TypeError, ImportError, IOError, netrc.NetrcParseError): 316 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
317 pass 317 pass
318 318
319 with opener.open(r) as response: 319 with opener.open(r, timeout=30) as response:
320 pass 320 pass
321 except urllib.error.URLError as e: 321 except urllib.error.URLError as e:
322 if try_again: 322 if try_again: