Difference between revisions of "Gsutil ls"

From wikieduonline
Jump to navigation Jump to search
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
https://cloud.google.com/storage/docs/gsutil/commands/ls
  
 +
* <code>[[gsutil ls --help]]</code>
 +
* <code>[[gsutil ls -L]]</code>
 +
* <code>[[gsutil ls -L]] -b</code>
 +
 +
[[gsutil]] ls
 +
gs://your-first-bucket/
 +
gs://your-second-bucket/
 +
 +
== Errors ==
 
  [[gsutil]] ls gs://yourBucketName/
 
  [[gsutil]] ls gs://yourBucketName/
 
  [[ServiceException: 401 Anonymous caller]] does not have [[storage.objects.list]] access to the [[Google Cloud Storage]] bucket.
 
  [[ServiceException: 401 Anonymous caller]] does not have [[storage.objects.list]] access to the [[Google Cloud Storage]] bucket.
 +
 +
Solution: gsutil ls gs://your_bucket_name/
 +
 +
gsutil ls
 +
[[AccessDeniedException]]: 403 your-user@your-project.[[iam.gserviceaccount.com]] does not have [[storage.buckets.list]] access to the Google Cloud project.
  
 
  gsutil ls
 
  gsutil ls
  You are attempting to perform an operation that requires a project id, with none configured. Please re-run gsutil config and make sure to follow the instructions for finding and entering your default [[project id]].
+
  You are attempting to perform an operation that requires a [[project id]], with none configured. Please re-run [[gsutil config]] and make sure to follow the instructions for finding and entering your default [[project id]].
 
+
  [[gsutil ls -L]]
+
  Solution: <code>[[gsutil config -e]]</code>
  
 
== Related ==
 
== Related ==
 
* <code>[[aws s3 ls]]</code>
 
* <code>[[aws s3 ls]]</code>
 +
* <code>[[AccessDeniedException]]</code>
 +
* <code>[[gsutil]] ls gs://your-first-bucket</code>
 +
* <code>[[gsutil acl get]] gs://your-first-bucket</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 17:36, 30 October 2022

Errors[edit]

gsutil ls gs://yourBucketName/
ServiceException: 401 Anonymous caller does not have storage.objects.list access to the Google Cloud Storage bucket.

Solution: gsutil ls gs://your_bucket_name/
gsutil ls 
AccessDeniedException: 403 your-user@your-project.iam.gserviceaccount.com does not have storage.buckets.list access to the Google Cloud project.
gsutil ls
You are attempting to perform an operation that requires a project id, with none configured. Please re-run gsutil config and make sure to follow the instructions for finding and entering your default project id.

Solution: gsutil config -e

Related[edit]

See also[edit]

Advertising: