r/GoogleAppsScript • u/EcstaticHelp771 • Dec 17 '25
Question clasp push works but clasp deploy suddenly fails
I’ve suddenly started having issues deploying with clasp from the command line. clasp push still works fine, but clasp deploy and clasp redeploy both fail with the same authentication error.
Here’s my console output:
p2@p:~/code/site/dist$ clasp push
Script is already up to date.
p2@p:~/code/site/dist$ clasp deploy
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
p2@p:~/code/site/dist$ clasp redeploy AK**********************************5g
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
This workflow had been working perfectly for dozens (maybe ~200) deployments, then stopped suddenly.
I tried logging out (clasp logout) and logging back in, but it didn’t change anything. The clasp push works but the clasp deploy or redeploy gets the same authentication error.
I can still push and then deploy manually in the Apps Script editor, but that defeats the purpose since I used to deploy entirely from the CLI.
Has anyone experienced this recently or knows what might cause clasp deploy to lose auth while clasp push still works?
Any insights appreciated! 🙏
3
u/zmandel Dec 17 '25
worked for about 200 deployments you say? that happens to be the maximum number of deployments you can have. If so, open your deployment history and remove a bunch.
otherwise, force logout and login again.
3
u/StartupHelprDavid Dec 18 '25
OMG SAMMEEE i thought i was going crazy!!! there must be a bug or something
2
u/ephraimsong Dec 17 '25
Honestly I can’t help here but want to start to use clasp. Is there a guide or resource to get started?
2
u/StartupHelprDavid Dec 18 '25
Figured it out:
Their github made changes:
Clasp 3.x introduces some breaking changes from 2.x. For common use cases these changes should not impact usage, but some lesser used commands have been restructured and renamed to improve consistency.
openopen-scriptopen --webopen-web-appopen --addonopen-containeropen --credsopen-credentials-setuplogin --creds <file>login -u <name> --creds <file>logs --openopen-logslogs --setupapis --openopen-api-consoleapis enable <api>enable-api <api>apis disable <api>disable-api <api>deploy -i <id>update-deployment <id>settings