Gsutil results in "CommandException: you have several types of credentials configured"

I am trying to run the gsutil command to display content in a bucket in google cloud storage. I am pretty sure that there is nothing wrong with the team.

The error I am getting is:

CommandException: You have multiple types of configured credentials (['Oauth 2.0 User Account', 'OAuth 2.0 Service Account']), which is not supported. For more help, see "gsutil help creds".

I read the details in "gsutil help creds", but it just contains high-level definitions for the four types of credentials, which doesn't help.

Reading the error message, it seems that I basically need to delete one of the “configured credentials”, in which case I want to delete the credentials of the “Oauth 2.0 user account”. And use the "OAuth 2.0 Service Account".

So I looked at the ".boto" file containing my automatically created credentials for the configuration, but it doesn't seem like there is an Oauth 2.0 user account that can be edited.

I also tried digging the entire Google Developer console to remove the Oauth 2.0 user account, but I cannot.

Basically, my question (assuming this is the right question), how do I delete the "Oauth 2.0 User Account" credentials in the Google Cloud Platform?

+4
source share
2 answers

Run:

gsutil -D

config_file_list, , .

Google Compute Engine? , gsutil ( gsutil) ~/.boto, GCE (/etc/boto.cfg)

+4

gcloud auth:

Usage: gcloud auth [optional flags] <command>
  command may be         activate-refresh-token | activate-service-account |
                         list | login | revoke

Manage oauth2 credentials for the Google Cloud SDK.

optional flags:
  --format FORMAT        Format for printed output.
  --help                 Display detailed help.
  --project PROJECT      Google Cloud Platform project to use for this
                         invocation.
  --quiet, -q            Disable all interactive prompts.
  -h                     Print a summary help and exit.

commands:
  activate-refresh-token
                         Get credentials via an existing refresh token.
  activate-service-account
                         Get credentials via the private key for a service
                         account.
  list                   List the accounts for known credentials.
  login                  Get credentials for the tools in the Google Cloud SDK
                         via a web flow.
  revoke                 Revoke authorization for credentials.
+1

All Articles