Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clasp login fails with --creds` option #784

Open
saito-ya opened this issue Jun 16, 2020 · 2 comments
Open

clasp login fails with --creds` option #784

saito-ya opened this issue Jun 16, 2020 · 2 comments

Comments

@saito-ya
Copy link

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

Expected Behavior

Success clasp login --creds creds.json and it is able to log in with my own credential.

Actual Behavior

Run clasp login --creds creds.json and get the following error message.

Logging in locally...

No valid .clasp.json project file. You may need to `create` or `clone` a project first.

Steps to Reproduce the Problem

  1. Go to APIs & Services > Credentials of my GCP project.
  2. Create OAuth 2.0 Client IDs (with type of Desktop)
  3. Download the credential json file
  4. run npm i clasp -g and install clasp globally
  5. run clasp login --creds path_to_credential.json

Specifications

  • Node version (node -v): v12.13.0
  • Version (clasp -v): 2.3.0
  • OS (Mac/Linux/Windows): Mac
@PopGoesTheWza
Copy link
Collaborator

@saito-ya can you test with the #791 unofficial release?

npm uninstall -g @google/clasp && npm install -g forked-clasp
clasp --version
# should be 2.4.0 or more

@sqrrrl
Copy link
Member

sqrrrl commented May 26, 2021

Intended behavior to require an existing project. --creds is really only used to set up auth for the run command and it does some other things in the associated GCP project.

Since it's a bit more specialized than the login command implies, may revisit this in 3.0 and break it out to a separate command to configure the run command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants