John White
John White

Reputation: 977

Powershell for Google Cloud: Authenticate with a service account

I'm trying to build an automatic sync solution that uses a Google Cloud storage bucket for storing data.

When I install the cloud SDK it asks for my authentication, but obviously I don't want to use my credentials on the client's server, it should be done with a service account with specific permissions, right?

The documentation just says to authenticate with your credentials. What is the security best practice here?

Upvotes: 0

Views: 3772

Answers (1)

John White
John White

Reputation: 977

Found it, it's this simple command:

gcloud auth activate-service-account --key-file=credentials.json

And it works! I can upload stuff with PowerShell

The doc is here

Upvotes: 5

Related Questions