google / clasp

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

Feature request: project specific token/authorization #894

Closed imthenachoman closed 2 years ago

imthenachoman commented 2 years ago

Right now, the auth token is handled globally using ~/.clasprc.json.

I am proposing a new feature where we can save a project specific copy of this file to use for clasp commands for that project.

So, you could have multiple projects, each using a different account.

Once implemented, clasp commands would look for the .clasprc.json file in the CWD, and then up the folder tree or falling back to the global ~/.clasprc.json.

imthenachoman commented 2 years ago

I am closing this issue. I think it doesn't make sense to put credential information in the folder, especially if you're pushing code to a public repo.

I solved my use-case by using VS Codes tasks with the clasp_config_auth environment variable.