Resolving Docker Hub auth failure #61

Closed
opened 2023-03-21 06:47:46 +00:00 by abentpole · 2 comments

Hey, I've just been giving this a test drive on my Gitea instance with a sample Actions Demo (below), the runner hits the following error (running on Ubuntu Server):

Could not get auth config from docker config: error getting credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`

Out of curiosity, I swapped it to runs-on: node:14 and was confused for a while as to why it wouldn't run, until I realised that's what the labels on the runner are for. Adding node:14 as a label in Gitea's custom labels made it run right away.

Just so I'm clear on how this works, ubuntu-latest isn't actually an image in particular, it's just that it is mapped by default to docker://node:16-bullseye? The agent defaults being:

"ubuntu-latest:docker://node:16-bullseye",
"ubuntu-22.04:docker://node:16-bullseye",
"ubuntu-20.04:docker://node:16-bullseye",
"ubuntu-18.04:docker://node:16-buster"

After changing the runs-on parameter to node:14 and adding this as a custom label in Gitea, it apparently ran using node:16-bullseye. Does this mean it defaults to the first label? And any idea why that worked perfectly fine without the docker login complaints? (Maybe the lack of docker://)

It almost seems like under default conditions it's trying to do a lookup on Docker Hub, requiring interactive auth.

Sorry about all of the questions here, if there's any documentation into these configurations that I've missed I'd love to know (I did some cursory digging into act but so far it's been trial-and-error).

Cheers!


name: Gitea Actions Demo
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
  Explore-Gitea-Actions:
    runs-on: ubuntu-latest
    steps:
      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
      - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
      - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
      - name: Check out repository code
        uses: actions/checkout@v3
      - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
      - run: echo "🖥️ The workflow is now ready to test your code on the runner."
      - name: List files in the repository
        run: |
          ls ${{ github.workspace }}
      - run: echo "🍏 This job's status is ${{ job.status }}."
Hey, I've just been giving this a test drive on my Gitea instance with a sample Actions Demo (below), the runner hits the following error (running on Ubuntu Server): ``` Could not get auth config from docker config: error getting credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY` ``` Out of curiosity, I swapped it to `runs-on: node:14` and was confused for a while as to why it wouldn't run, until I realised that's what the labels on the runner are for. Adding `node:14` as a label in Gitea's custom labels made it run right away. Just so I'm clear on how this works, `ubuntu-latest` isn't actually an image in particular, it's just that it is mapped by default to `docker://node:16-bullseye`? The agent defaults being: ``` "ubuntu-latest:docker://node:16-bullseye", "ubuntu-22.04:docker://node:16-bullseye", "ubuntu-20.04:docker://node:16-bullseye", "ubuntu-18.04:docker://node:16-buster" ``` After changing the `runs-on` parameter to `node:14` and adding this as a custom label in Gitea, it apparently ran using `node:16-bullseye`. Does this mean it defaults to the first label? And any idea why that worked perfectly fine without the `docker login` complaints? (Maybe the lack of `docker://`) It almost seems like under default conditions it's trying to do a lookup on Docker Hub, requiring interactive auth. Sorry about all of the questions here, if there's any documentation into these configurations that I've missed I'd love to know (I did some cursory digging into `act` but so far it's been trial-and-error). Cheers! ----- ``` name: Gitea Actions Demo run-name: ${{ github.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." ```
Owner

Maybe this blog can help you.

Maybe this [blog](https://blog.gitea.io/2023/03/hacking-on-gitea-actions/#act-runner) can help you.
wolfogre added the
kind
help wanted
reviewed
needs feedback
labels 2023-04-03 09:21:13 +00:00
Owner

Closing issue due to no response for a long time. Feel free to reopen if needed. Thanks!

Closing issue due to no response for a long time. Feel free to reopen if needed. Thanks!
wolfogre removed the
reviewed
needs feedback
label 2023-04-19 04:04:22 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#61
No description provided.