mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Ignore /clone.bundle on HTTP 401, 403 and 404
401: Unauthorized, authentication may be required. This is usually handled internally by the HTTP client in Python. If it reaches our code in repo, the Python HTTP client didn't find a password in ~/.netrc that it could use. 403: Authentication was supplied, but is incorrect. It might be that the CDN doesn't want to offer this clone.bundle file to the client, but the Git fetch operation would still be successful. This might arise if branch level read controls were used in Gerrit Code Review and the /clone.bundle file contained branches not visible to the client. 404: The server has no /clone.bundle file available. In all of these cases, sliently ignore the /clone.bundle file HTTP error and let the Git operation take over. Change-Id: I1787f3cac86b017351952bbb793fe5874d83c72b
This commit is contained in:
parent
cd7c5deca0
commit
c3d2f2b76f
@ -1516,7 +1516,7 @@ class Project(object):
|
|||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if e.code == 404:
|
if e.code in (401, 403, 404):
|
||||||
keep = False
|
keep = False
|
||||||
return False
|
return False
|
||||||
elif _content_type() == 'text/plain':
|
elif _content_type() == 'text/plain':
|
||||||
|
Loading…
Reference in New Issue
Block a user