go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.12k stars 5.49k forks source link

git admin add-oauth --group-team-map-removal fails #31669

Open angelnu opened 3 months ago

angelnu commented 3 months ago

Description

When using the group-team-map-removal: true in the gitea helm chart values, gitea fails to boot:

Output from the configure-giteainit container:

No oauth configuration found with name 'kvant'. Installing it now...
Command error: auth source is not activated

which comes from https://gitea.com/gitea/helm-chart/src/commit/2a762f0865b69e8e95d5b7c91b1e758b44f23ee6/templates/gitea/init.yaml#L218

If I remove group-team-map-removal and boot once without it, then it works. Afterwards I can add it again and the command git admin update-oauth happily accepts it, even if the docs do not list it as valid argument.

This is the relevant part of the helm chart values.

gitea:
    admin:
        password: ydZeProh_driAR54mVFfRg
    oauth:
      - name: "kvant"
        provider: "openidConnect"
        ...
        group-team-map-removal: true

So I think there are 2 bugs:

Gitea Version

gitea/gitea:1.22.0-rootless

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

gitea/gitea:1.22.0-rootless Docker container

Operating System

Kubernetes (OpenShift)

How are you running Gitea?

Kubernetes, using the official gitea Helm chart 10.2.0

Database

PostgreSQL

lunny commented 3 months ago

Can you please also send a PR to https://gitea.com/gitea/helm-chart? I don't know it's a bug of helm chart to Gitea itself.