Error when trying to add new google oauth provider via command line: "Command error: auth source is not activated" #13386

Closed
opened 2025-11-02 10:40:50 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @matera-mos on GitHub (Aug 14, 2024).

Description

I'm trying to add new oauth google provider via command line to my gitea installation.
But I'm getting the following error:

$ gitea admin auth add-oauth --name external-google --provider google --key ${GOOGLE_KEY_PROVIDER} --secret ${GOOGLE_SECRET_PROVIDER}
Command error: auth source is not activated

When trying to add a new oauth provider from github this command works correctly.

Gitea Version

gitea/gitea:1.22.1-rootless

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.34.1

Operating System

Ubuntu 22.04.4 LTS + docker

How are you running Gitea?

The error was initially identified when using gitea in kubernetes via helm-charts.
However, during the analysis, I reproduced the error by running gitea in a docker container.

Database

SQLite

Originally created by @matera-mos on GitHub (Aug 14, 2024). ### Description I'm trying to add new oauth google provider via command line to my gitea installation. But I'm getting the following error: ``` $ gitea admin auth add-oauth --name external-google --provider google --key ${GOOGLE_KEY_PROVIDER} --secret ${GOOGLE_SECRET_PROVIDER} Command error: auth source is not activated ``` When trying to add a new oauth provider from github this command works correctly. ### Gitea Version gitea/gitea:1.22.1-rootless ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.34.1 ### Operating System Ubuntu 22.04.4 LTS + docker ### How are you running Gitea? The error was initially identified when using gitea in kubernetes via helm-charts. However, during the analysis, I reproduced the error by running gitea in a docker container. ### Database SQLite
GiteaMirror added the issue/not-a-bug label 2025-11-02 10:40:50 -06:00
Author
Owner

@yp05327 commented on GitHub (Aug 15, 2024):

image
image

It seems that the provider name is gplus, Google is display name.

@yp05327 commented on GitHub (Aug 15, 2024): ![image](https://github.com/user-attachments/assets/e8adf745-8367-4c51-b133-82153ee3e931) ![image](https://github.com/user-attachments/assets/b15d8e07-4040-4ec9-8729-94d20b9248a1) It seems that the provider name is `gplus`, `Google` is display name.
Author
Owner

@matera-mos commented on GitHub (Aug 16, 2024):

Thanks @yp05327 , with this change works for me.

@matera-mos commented on GitHub (Aug 16, 2024): Thanks @yp05327 , with this change works for me.
Author
Owner

@lunny commented on GitHub (Aug 16, 2024):

Although it's not a bug, but it's better to have a list of all supported oauth provider in the command line.

@lunny commented on GitHub (Aug 16, 2024): Although it's not a bug, but it's better to have a list of all supported oauth provider in the command line.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13386