clasp: Can't run "clasp login" command
I want to do clasp login and use clasp, but I can’t login.
Expected Behavior
I want the login process to work correctly. I want to display the Google authentication popup correctly.
Actual Behavior
The screen looks like the image below and I can’t proceed.

Steps to Reproduce the Problem
- install clasp → npm install -g @google/clasp
- run “clasp login --no-localhost”
- copy URL and paste URL to Google Chrome
Specifications
- Node version (
node -v): v18.12.1 - Version (
clasp -v): 2.4.2 - OS (Mac/Linux/Windows): Linux (debian)
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 9
- Comments: 15
I found a working clasp login solution for containers on StackOverflow:
Original post from StackOverlow by Paul: When using cloud SaaS such as gitpod, the disablement of out of band (OOB) OAuth also causes problems. The workaround here is to use clasp login and copy the URL in the localhost page that fails at the end. Start a new bash terminal on the cloud service and then run curl ‘<paste in URL>’ – Paul Mar
I tested it on Gitpod and it works like a charm. Here’s what I did to login from within the Gitpod cotainerized environment:
I hope this helps someone
Kind regards, Tailor VJ
I think that is correct. I found this file on my local system as well, at the same location. I guess on Gitpod this is enabled by default. I’m not a huge ecpert on Docker though, so can’t tell for sure. Glad you managed to get it working
Cheers, Tailor
I have just tested clasp login on Gitpod with the following repo, and it seems to be working just fine by using the curl hack on a second terminal. https://github.com/tailorvj/hello-clasp
Try to fork it, deploy it to gitpod.io (Instructions in the README), and let me know whether it’s worked for you.
Here is a video where I demo from Google’s C2C online meetup where I demo this login technique: https://www.youtube.com/watch?v=RaMt5yZdzqI
I hope this helps. Kind regards, Tailor
Me too
+1 I have also faced issue after the latest version upgrade
+1 also having this issue