GithubHelp home page GithubHelp logo

Error: both --service-token and --service-token-id are required for service token authentication about pscale-workflow-helper-scripts HOT 4 CLOSED

jonico avatar jonico commented on June 8, 2024 1
Error: both --service-token and --service-token-id are required for service token authentication

from pscale-workflow-helper-scripts.

Comments (4)

alanPaivaAsp avatar alanPaivaAsp commented on June 8, 2024 1

Looking for previous deploy actions in this repo, i can see similar error as well
https://github.com/jonico/pscale-workflow-helper-scripts/runs/5155701822?check_suite_focus=true

from pscale-workflow-helper-scripts.

jonico avatar jonico commented on June 8, 2024

👋 @alanPaivaAsp - thank you so much for giving the scripts in this repo a try.
I just tested the latest version of the scripts successfully creating a new deploy request here: https://github.com/planetscale-demo/devopscon-london-demo/runs/6273184049?check_suite_focus=true

I will have a deeper look into your example right now ...

from pscale-workflow-helper-scripts.

jonico avatar jonico commented on June 8, 2024

@alanPaivaAsp: I do not have access to your environment, but my guess is that your GitHub Actions workflow gets set with all secrets and then in deploy-database-staging.sh you unset the name of the service token:

unset PLANETSCALE_SERVICE_TOKEN_NAME

With that, the web based authentication logic will kick in (as shown in your output), but as PLANETSCALE_SERVICE_TOKEN and/or PLANETSCALE_SERVICE_TOKEN_ID are still set, the planetscale CLI called in the create-deploy-request helper function is confused whether it should take the Web SSO auth credentials or the service token ones.

In order to fix, you could either
a) do not unset any service token related environment variables (and do not use web based SSO for authentication)
b) also unset (or do not even pass) PLANETSCALE_SERVICE_TOKEN and PLANETSCALE_SERVICE_TOKEN_ID so that the pscale CLI will use the credentials obtained in the web based authentication flow

Looking forward to your feedback whether this helps 😊

from pscale-workflow-helper-scripts.

jonico avatar jonico commented on June 8, 2024

closing issue, feel free to reopen if needed

from pscale-workflow-helper-scripts.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.