I,ve added my service-account successfuly using below command.
gcloud auth activate-service-account --key-file=mycredentialsialreadyhad.json
Now I can't remove or logout from it.
any help would be greatly appreciated.
edit: i tried this commands and got error
- gcloud auth revoke
ERROR: (gcloud.auth.revoke) Cannot revoke GCE-provided credentials.
- gcloud config configurations delete default
ERROR: (gcloud.config.configurations.delete) Deleting named configuration failed because configuration [default] is set as active. Use
gcloud config configurations activate
to change the active configuration.
edit2: this gcloud cli is on GCP ubuntu VM
If you want to delete the added or custom service account, go to IAM or Access > IAM, tick the checkbox of your added service account then click Remove to remove the access and fully remove it to your project.
Go to your Google Account. On the left navigation Panel, click Data & personalization. On the Download, delete, or make a plan for your data panel, click Delete a service or your account. On the Delete your Google Account panel, click Delete your account.
Try a command with a specified account because you can't revoke the Compute Engine service account(default).
For example:
gcloud auth revoke [email protected]
and run:
gcloud auth list
It should only display the default service account:
[PROJECT-NUMBER][email protected]
Use the below syntax to activate the service account. Here we need to mention service account ID. gcloud auth activate-service-account [email protected] --key-file=xxxxxx.json --project=xxxxxx
Use the below syntax to revoke the service account:
gcloud auth revoke [email protected]
Error encountered in your case because the service account ID was not mentioned in gcloud auth revoke command , which is trying to revoke your active google account.
Permissions are denied if you disable the service account instead of revoke. If you revoke the service account then default account will get activated and that might have permission to storage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With