Keep getting error: Username and password required

Hi experts,

I have set up the secrets of my repo so that the image can be push to Docker hub. I have entered the token access which I have copied from Dockerhub, the key-value pair and pasted in Github secrets. Furthermore, I have also entered my Dockerhub username and password in the secrets.

But, when I run my build file, github action workflow will just give me the below error.

Run docker/login-action@v1

Error: Username and password required

Hope some one can help me out cos I am behind my course schedule and I need to speed things up abit. Tks.

Saying why that might happen requires more detail about how you use the action. Best would be if you could share a link to the workflow run, or at the very least an excerpt from the workflow YAML.

Getting this error for ~50% of workflow runs. The yamls is pretty straight forward:

    runs-on: ubuntu-latest

      - name: Log into GitHub Container Registry 
        uses: docker/login-action@v1
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GHCR_TOKEN }}

edit - just a thought, maybe it’s by design: is it related to builds triggered by dependabot, that cannot access the secret? could explain the “50% failing” observation

That’s likely, without secret access the password will be empty, and I’m sure that means login will fail. If the failing builds are pull requests from Dependabot (or forks) it’s likely that.