google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.52k stars 422 forks source link

Facing issue when tried to do clasp login with service account #965

Open nisjain-conga opened 1 year ago

nisjain-conga commented 1 year ago

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

Login with clasp with service account key

Actual Behavior

Logging in locally…

Authorizing with the following scopes: https://www.googleapis.com/auth/script.container.ui https://www.googleapis.com/auth/documents https://www.googleapis.com/auth/script.webapp.deploy

NOTE: The full list of scopes your project may need can be found at script.google.com under: File > Project Properties > Scopes

Error retrieving access token: TypeError: Cannot destructure property 'client_id' of 'options.creds.installed' as it is undefined.

Steps to Reproduce the Problem

Create service account into GCP Generate keys & download it npx @google/clasp login --creds generated-key.json

Specifications

oleksandrTSY commented 7 months ago

Seems there is no way to use service account with clasp ? https://developers.google.com/apps-script/api/concepts Can someone approve it to not waste time of other who are interesting in this topic ? Very strange approach, mostly only service accounts available rather then 'main' account.