Prisma1: Prisma CLI does not respect explicit PRISMA_MANAGEMENT_API_SECRET, overrides it

Created on 27 Nov 2018  路  4Comments  路  Source: prisma/prisma1

Describe the bug
When prodiving the PRISMA_MANAGEMENT_API_SECRET env var to the CLI, it should use that value and not override it with a value based on the logged in account

To Reproduce
Steps to reproduce the behavior:

  1. Be logged in to Prisma CLI
  2. Have a deployed server protected by a managementApiSecret
  3. Try to perform prisma deploy
  4. See error:
Creating stage dev for service heroku-database

ERROR: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.

{
  "data": {
    "addProject": null
  },
  "errors": [
    {
      "locations": [
        {
          "line": 2,
          "column": 9
        }
      ],
      "path": [
        "addProject"
      ],
      "code": 3015,
      "message": "Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.",
      "requestId": "local:management:cjofwmfmt00050684141qxrsn"
    }
  ],
  "status": 200
}

Expected behavior
For the deploy to be succesful

Versions (please complete the following information):

  • OS: MacOS Mojave
  • prisma CLI: prisma/1.21.0 (darwin-x64) node-v10.9.0
  • Prisma Server: [e.g. 1.20.4]

Additional context
This was the root of the problem in this issue, more context can be found here.

Workaround
Log out of the CLI and perform the deploy.

bu2-confirmed arecli

Most helpful comment

This is fixed in beta.

All 4 comments

@jhalborg Now, I have a this problem same you.

Same here. The workaround helped for now

I try to prisma log out and clear cloud session key It's not working. But I can deploy first server and first service. In the server & service 2 It's can't deploy. I try to use Heroku to practice step to deploy.

This is fixed in beta.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sedubois picture sedubois  路  3Comments

jannone picture jannone  路  3Comments

marktani picture marktani  路  3Comments

marktani picture marktani  路  3Comments

AlessandroAnnini picture AlessandroAnnini  路  3Comments