mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Add gsutil.py config hint to 401 GCS error message
This CL adds a hint on how to log into GCS to the 401 error message displayed to the user. Bug: 381634957 Change-Id: Id72b5030c018b28a7297b7ff3f279485c6da4d9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6056844 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Alan Cutter <alancutter@chromium.org>
This commit is contained in:
@@ -143,7 +143,8 @@ class Gsutil(object):
|
||||
if status_code_match:
|
||||
return (int(status_code_match.group(1)), out, err)
|
||||
if ('ServiceException: 401 Anonymous' in err):
|
||||
return (401, out, err)
|
||||
return (401, out, err + '\nTry running "gsutil.py config" to log '
|
||||
' into Google Cloud Storage.')
|
||||
if ('You are attempting to access protected data with '
|
||||
'no configured credentials.' in err):
|
||||
return (403, out, err)
|
||||
|
||||
Reference in New Issue
Block a user