diff options
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 03e56471d8..bb83462461 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -1028,7 +1028,7 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): | |||
1028 | raise | 1028 | raise |
1029 | 1029 | ||
1030 | except IOError as e: | 1030 | except IOError as e: |
1031 | if e.errno in [os.errno.ESTALE]: | 1031 | if e.errno in [errno.ESTALE]: |
1032 | logger.warning("Stale Error Observed %s." % ud.url) | 1032 | logger.warning("Stale Error Observed %s." % ud.url) |
1033 | return False | 1033 | return False |
1034 | raise | 1034 | raise |
@@ -1717,7 +1717,7 @@ class Fetch(object): | |||
1717 | update_stamp(ud, self.d) | 1717 | update_stamp(ud, self.d) |
1718 | 1718 | ||
1719 | except IOError as e: | 1719 | except IOError as e: |
1720 | if e.errno in [os.errno.ESTALE]: | 1720 | if e.errno in [errno.ESTALE]: |
1721 | logger.error("Stale Error Observed %s." % u) | 1721 | logger.error("Stale Error Observed %s." % u) |
1722 | raise ChecksumError("Stale Error Detected") | 1722 | raise ChecksumError("Stale Error Detected") |
1723 | 1723 | ||
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) |