Authentication
In order to fetch spreadsheet via lokse update
command, you need to authenticate first. lokse
uses Application default credential – sign-in just with your Google account or provide service account.
Authenticate lokse
locally (in your CLI):
-
Install
gcloud
first: -
Sign-in with Google:
gcloud auth application-default login --scopes=openid,https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.file
-
Fetch spreadsheets:
lokse update
-
In case of getting quote project warning:
gcloud auth application-default set-quota-project <project-name>
Authentication lokse
in CI pipeline:
https://cloud.google.com/docs/authentication/provide-credentials-adc:
export GOOGLE_APPLICATION_CREDENTIALS="SERVICE_ACCOUNT_KEY_PATH"