Skip to content

Add Gitea as authentication provider - #9558

Merged
taylorsilva merged 1 commit into
masterfrom
gitea-auth
Apr 30, 2026
Merged

taylorsilva merged 1 commit into
masterfrom
gitea-auth

Conversation

@taylorsilva

Copy link
Copy Markdown
Member

Changes proposed by this PR

Related to #6194

This was mostly an exercise in exposing the connector provided by Dex. I wired it up and it Just Worked™️!

I verified that the "groups" are returned in the same format as Github which is why the team flags are the same. From the web node logs after logging in:

{"connector_id":"gitea","email":"[email protected]","groups":["concourse","concourse:Owners"],"preferred_username":"test","session":"17","username":"[email protected]"}

I locally confirmed this works by setting up a local gitea with docker compose and configuring an OAuth2 app. Setup process is similar to Github or Gitlab.

The following flags are added to the web command:

Authentication (Main Team) (Gitea):
--main-team-gitea-user=USERNAME             A whitelisted Gitea user [$CONCOURSE_MAIN_TEAM_GITEA_USER]
--main-team-gitea-org=ORG_NAME              A whitelisted Gitea org [$CONCOURSE_MAIN_TEAM_GITEA_ORG]
--main-team-gitea-team=ORG_NAME:TEAM_NAME   A whitelisted Gitea team [$CONCOURSE_MAIN_TEAM_GITEA_TEAM]

Authentication (Gitea):
--gitea-display-name=    The auth provider name displayed to users on the login page (default: Gitea) [$CONCOURSE_GITEA_DISPLAY_NAME]
--gitea-client-id=       (Required) Client id [$CONCOURSE_GITEA_CLIENT_ID]
--gitea-client-secret=   (Required) Client secret [$CONCOURSE_GITEA_CLIENT_SECRET]
--gitea-host=            Hostname of Gitea deployment (Include scheme, No trailing slash) [$CONCOURSE_GITEA_HOST]

I verified that the "groups" are returned in the same format as Github
which is why the team flags are the same.

I've included a DisplayName option as well since I figure the Forgejo
folks might want it to say Forgejo instead.

Signed-off-by: Taylor Silva <[email protected]>
@taylorsilva
taylorsilva requested a review from a team April 30, 2026 00:14
@taylorsilva
taylorsilva merged commit 3cf1748 into master Apr 30, 2026
12 checks passed
@taylorsilva
taylorsilva deleted the gitea-auth branch April 30, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant