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

Gitea Actions use service public image and container private image username password doesnt work #32963

Open
rchekhina opened this issue Dec 23, 2024 · 0 comments
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@rchekhina
Copy link

Description

HI,

I have a strange behavior when I use service and container on the same jobs. It seems that if you use service with a public docker image without username and password and a service with a private image and username password the pull of the image doesnt work with 401 error.
Is like it take the same credential of the service.
this following job failed:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    services:
      db:
        image: mysql:8
    container:
        image: mydocker.org/php/8.2:fpm-composer2
        credentials:
           username: ${{  vars.REGISTRY_USER }}
           password: ${{  secrets.REGISTRY_PASSWD }}

If I remove the service like this the job works:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    container:
        image: mydocker.org/php/8.2:fpm-composer2
        credentials:
           username: ${{  vars.REGISTRY_USER }}
           password: ${{  secrets.REGISTRY_PASSWD }}

the workaround that I found was to pass the same credentials for the public and private image like following:

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    services:
      db:
        image: mysql:8
        credentials:
           username: ${{  vars.REGISTRY_USER }}
           password: ${{  secrets.REGISTRY_PASSWD }}
    container:
        image: mydocker.org/php/8.2:fpm-composer2
        credentials:
           username: ${{  vars.REGISTRY_USER }}
           password: ${{  secrets.REGISTRY_PASSWD }}

Best regards.

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

running gitea on k8s install with helm

Database

PostgreSQL

@Zettat123 Zettat123 added the topic/gitea-actions related to the actions of Gitea label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

No branches or pull requests

2 participants