github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Cannot deploy: you are not currently logged in

Open arpecop opened this issue 5 years ago • 6 comments

name: Deploy
on:
    push:
        branches:
            - master
jobs:
    deploy:
        name: Deployment
        runs-on: ubuntu-latest
        strategy:
            matrix:
                stages:
                    - stage: 'prod'
                      AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCESS_KEY_PROD'
                      AWS_ACCESS_KEY_ID: 'AWS_ACCESS_KEY_ID_PROD'
        steps:
            - name: Checkout
              uses: actions/checkout@v2
            - name: npm install and build
              run: npm install
            - name: Install VPC Plugin and Deploy
              uses: serverless/[email protected]
              with:
                  args: -c "serverless deploy --stage=${{ matrix.stages.stage }} --verbose"
                  entrypoint: /bin/bash
              env:
                  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
                  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Screenshot 2020-06-26 at 17 21 19

I added GitHub to serverless and my repos are listing there

arpecop avatar Jun 26 '20 14:06 arpecop

I ran into the same problem using the AWS key approach, go with SERVERLESS_ACCESS_KEY instead. Go here to see how to create a serverless access key: https://www.serverless.com/framework/docs/dashboard/cicd/running-in-your-own-cicd/

nclaveeoh avatar Aug 08 '20 01:08 nclaveeoh

Also check whether you have

#app: your-app-name
#org: your-org-name

defined in serverless.yaml

I had, but they were wrong: removing those keys altogether fixed the "you are not logged in" issue for me.

marcelloromani avatar May 19 '22 12:05 marcelloromani

I had the same issue while deploying with bitbucket pipelines (worked fine from the local machine). The removal of "org: *****" from serverless.yml solved the problem.

Any ideas where the root of the problem is?

AlexRypun avatar Jun 05 '22 13:06 AlexRypun

I had the same issue while deploying with bitbucket pipelines (worked fine from the local machine). The removal of "org: *****" from serverless.yml solved the problem.

Any ideas where the root of the problem is?

it worked for me

magiskboy avatar Feb 01 '24 09:02 magiskboy

If you want to use AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY you need to add --use-local-credentials in your args.

ryanlawson avatar May 18 '24 00:05 ryanlawson

Created #90 to add specific options for this.

ryanlawson avatar May 18 '24 21:05 ryanlawson