Prisma1: It is impossible to produce "prisma deploy" on your server

Created on 26 Apr 2018  Â·  9Comments  Â·  Source: prisma/prisma1

Already signed in
Error: Not authorized. Please provide a proper 'Authorization' header: {"response":{"data":{"generateClusterToken":null},"errors":[{"message":"Not authorized. Please provide a proper 'Authorization' header","locations":[{"line":3,"column":9}],"path":["generateClusterToken"],"code":403}],"status":200},"request":{"query":"\n      mutation ($input: GenerateClusterTokenRequest!) {\n        generateClusterToken(input: $input) {\n          clusterToken\n        }\n      }\n    ","variables":{"input":{"workspaceSlug":"*","clusterName":"default","serviceName":"abuga","stageName":"dev"}}}}
    at GraphQLClient.<anonymous> (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\src\index.ts:71:13)
    at step (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:40:23)
    at Object.next (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:21:53)
    at fulfilled (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:12:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
Exiting with code: 1

On the server everything works out.

bu0-needs-info

Most helpful comment

I want to make a remote deployment

All 9 comments

Thanks for bringing this up, @overpod.
Can you provide the following information?

  • Output of prisma version
  • Output of prisma account
  • Output of cat prisma.yml. If it references env variables, please share the ones you feel comfortable sharing.
  • What exact commands are you running to end up with this error message?

prisma version

$ prisma version
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +2ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id version +5ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +0ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +9ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +12ms
  StatusChecker setting status checker +646ms
prisma/1.7.1 (windows-x64) node-v8.9.4

prisma account

$ prisma account
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +1ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +1ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +1ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id account +5ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\prisma-cli-core +0ms
  portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', 'fe80::7930:b57d:12f2:bef', '172.31.74.33', 'fe80::f0a9:1ce4:dbb1:6544', '172.25.112.1', 'fe80::5c36:5731:da66:5a12', '192.168.56.1', 'fe80::a4d0:4c24:57ae:8fd9', '192.168.0.30', '::1', '127.0.0.1' ] +0ms
  cli-engine:plugins:manager required +362ms
  plugin required command +366ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +1ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +138ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +0ms
  StatusChecker setting status checker +972ms
  client Sending query to cloud api +0ms
  client https://api.cloud.prisma.sh +1ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +1ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +0ms
  client Sending query to cloud api +347ms
  client https://api.cloud.prisma.sh +1ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +1ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +0ms
Email: [email protected]
Name:  overpod

cat prisma.yml

$ cat ./prisma.yml
datamodel: datamodel.graphql
endpoint: https://prisma.abuga.ru/abuga/dev

exact commands

$ prisma deploy
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +2ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +1ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id deploy +5ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\prisma-cli-core +0ms
  portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', 'fe80::7930:b57d:12f2:bef', '172.31.74.33', 'fe80::f0a9:1ce4:dbb1:6544', '172.25.112.1', 'fe80::5c36:5731:da66:5a12', '192.168.56.1', 'fe80::a4d0:4c24:57ae:8fd9', '192.168.0.30', '::1', '127.0.0.1' ] +0ms
  cli-engine:plugins:manager required +369ms
  plugin required command +373ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +1ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +110ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +2ms
  StatusChecker setting status checker +993ms

Authenticating...  client Sending query to cloud api +0ms
  client https://api.cloud.prisma.sh +0ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +2ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +1ms
 √
Already signed in
Error: Not authorized. Please provide a proper 'Authorization' header: {"response":{"data":{"generateClusterToken":null},"errors":[{"message":"Not authorized. Please provide a proper 'Authorization' header","locations":[{"line":3,"column":9}],"path":["generateClusterToken"],"code":403}],"status":200},"request":{"query":"\n      mutation ($input: GenerateClusterTokenRequest!) {\n        generateClusterToken(input: $input) {\n          clusterToken\n        }\n      }\n    ","variables":{"input":{"workspaceSlug":"*","clusterName":"default","serviceName":"abuga","stageName":"dev"}}}}
    at GraphQLClient.<anonymous> (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\src\index.ts:71:13)
    at step (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:40:23)
    at Object.next (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:21:53)
    at fulfilled (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:12:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
Exiting with code: 1

I got the same error. This is what work for me, I change the endpoint from
https://prisma.abuga.ru/abuga/dev
to
http://localhost:4466/abuga/dev
and deploy it from the server.

from the server it works.
does not work with the development machine.

I want to make a remote deployment

[email protected] seem to work now :)

[email protected] seem to work now :)

but did you try?

@overpod yes I did

All problems are solved in version 1.7.3. Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikolasburk picture nikolasburk  Â·  3Comments

marktani picture marktani  Â·  3Comments

schickling picture schickling  Â·  3Comments

notrab picture notrab  Â·  3Comments

marktani picture marktani  Â·  3Comments