Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login fails asking for a password although one appears to be provided #52

Closed
AlexJeffcott opened this issue Jan 22, 2021 · 4 comments
Closed

Comments

@AlexJeffcott
Copy link

Behaviour

When running workflow it errors at the login step, talking about a missing password.

I have created a PAT as described in #6

Steps to reproduce this issue

  1. run workflow

Expected behaviour

Should log in as expected

Actual behaviour

Errors
image

Configuration

name: Deploy and run

on:
  push:
    branches: master
  workflow_dispatch:

jobs:
  Deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
      - name: Login to GitHub Container Registry
        uses: docker/login-action@v1
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_REGISTRY_TOKEN }}

Logs

https://github.com/AlexJeffcott/amboss-cypress-demo/runs/1750353837?check_suite_focus=true#step:3:6

@crazy-max
Copy link
Member

crazy-max commented Jan 22, 2021

@AlexJeffcott

Looks like ${{ secrets.GITHUB_REGISTRY_TOKEN }} is empty or missing. Have you created the GITHUB_REGISTRY_TOKEN secret for your repository? See https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository

@AlexJeffcott
Copy link
Author

AlexJeffcott commented Jan 23, 2021

I have indeed created the PAT - I believe that the secrets are stripped out of the logs for security reasons.

Do you know of some way of varifying that the secret is actualy there?

EDIT
ah - forgive me I assumed you meant PAT, rather than a secret for the repo.

Will do that and get back to you.

@crazy-max
Copy link
Member

crazy-max commented Jan 23, 2021

@AlexJeffcott You have to create a PAT with the appropriate scopes and add it as a secret for your repo.

@AlexJeffcott
Copy link
Author

Yes, I did exactly that just now and it works perfectly!
Thank you very much.
Can I suggest that you add this to the readme in some way as it was absolutely not clear to me that you had to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants