9
votes

There are so many keys to be created for use with Google Compute Cloud. I'm trying to create .boto file using gsutil and it's asking for "Google access key ID". My goal is to script access to "Google Cloud Storage" using Python.

So, when gsutil is asking for "Google access key ID" - is it the one from

  • Credentials->Service account keys? or
  • Credentials->OAuth 2.0 client IDs? or
  • Credentials->API keys?
3

3 Answers

10
votes

gsutil config -a lets you use HMAC-style access keys. These aren't service account keys; if you want to use a service account you should use gsutil config -e. But if you really did want to use HMAC keys, you can get them from https://console.cloud.google.com/storage/settings, then click on "Interoperability". From there you can create an access key if you don't already have one, and you can copy/paste the access key and secret that you need to enter with gsutil config -a.

2
votes

Use service account to solve this problem.

gcloud auth activate-service-account --key-file json_file
0
votes

It's second option

  • Credentials->OAuth 2.0 client IDs

For Cloud Storage API access I have to use OAuth2 because I access user data.

If I had to access Translate API I'd use API Key because no user data access required.

Docs are here.