Authenticating Service Accounts

Asked 2 months ago, Updated 2 months ago, 8 views

When I tried to activate a service account in the Google Cloud SDK, I received the following error:

ERROR:(gcloud.auth.activate-service-account)Unable to read file
./credential.json—Errno2 No such file or directory:
'./credential.json'

I don't know if the location of the Key_file is different or not, so I would appreciate it if you could tell me how to deal with it.
Below is the full text.
他社 Due to the GCS account that I spit out via another company, I cannot use the console and I am trying to set it up with gsutil

参照Refer to the documentation
https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account

C:\Local\Google\Cloud SDK>gcloud auth list
         Credentialed Accounts
ACTIVE ACCOUNT
        [email protected]

To set the active account, run:
    $ gcloud config set account `ACCOUNT`


C:\Local\Google\Cloud SDK>gcloud config set account [email protected] xxx-service-account-2.iam.gserviceaccount.com
Updated property [core/account].

C:\Local\Google\Cloud SDK>gcloud auth list
         Credentialed Accounts
ACTIVE ACCOUNT
        [email protected]

To set the active account, run:
    $ gcloud config set account `ACCOUNT`


C:\Local\Google\Cloud SDK>gcloud auth activate-service-account [email protected] --key-file./credential.json --project xxxx-per-client
ERROR: (gcloud.auth.activate-service-account) Enable to read file [./credential.json]: [Errno2] No such file or directory: './credential.json'

google-cloud google-drive-sdk

2022-09-30 14:23

1 Answers

I changed the name of the json file and it was executed.
Thank you.


2022-09-30 14:23

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.