Feature request
I have a company project using clasp and a private one. When I'm switching projects, I need to change my clasp login inbetween.
If possible, it'd be nice to store a separate login projectwise instead of a global clasp login.
I wrote a proposal of how we could store multiple Google account login creds here: https://github.com/google/clasp/issues/12#issuecomment-370672417
Basically, you can set settingIds ([default/global]/"work"/"personal"/"testGoogleAccount") that you can tie to projects.
i.e. multilogin support.
You can clasp login --creds creds.json with your own credentials from different profiles if you're interested in working with multiple projects right now. This saves the credentials per directory, but it takes some setup.
You could also do something like this:
clasp login # work
mv ~/.clasprc.json ~/.clasprc-work.json
clasp login # personal
mv ~/.clasprc.json ~/.clasprc-personal.json
Switch with:
cp ~/.clasprc-personal.json ~/.clasprc.json
New flag:
clasp login --local
Saves .clasprc.json locally, but would use global clasp credentials.
clasp login # global for all projects
clasp login --creds creds.json # your own creds
clasp login --local # local project. Useful for multiple Google accounts.
clasp login --creds creds.json --local # own creds, local
See https://github.com/google/clasp/pull/447/files#r240480830
Sounds like a clean solution. Thanks, I'm looking forward to it!
Is there hope of any progress soon?
clasp login --local
unfortunately, this workaround doesn't work anymore as of 2.3.0 version:
error: unknown option '--local'
Try replacing @google/clasp 2.3.0 with forked-clasp which is more advanced. : https://github.com/PopGoesTheWza/clasp/blob/forked/docs/config-files.md
npm uninstall -g @google/clasp
npm install -g forked-clasp
Most helpful comment
Solution
New flag:
Saves
.clasprc.jsonlocally, but would use globalclaspcredentials.See https://github.com/google/clasp/pull/447/files#r240480830