-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Preconfigure Git Credential Manager as instance-wide OAuth application #25189
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
Comments
@hickford You seem to be the author of git-credential-oauth. If we tried to integrate it into Gitea, would a pre-registered OAuth application be enough for it to work? Would we need to implement something else? |
@denyskon Two changes are necessary:
|
Thanks, I'll take a look tomorrow. |
An alternative approach could be to hard code the application in GetOAuth2ApplicationByClientID without database records. #25774 |
This PR is an extended implementation of #25189 and builds upon the proposal by @hickford in #25653, utilizing some ideas proposed internally by @wxiaoguang. Mainly, this PR consists of a mechanism to pre-register OAuth2 applications on startup, which can be enabled or disabled by modifying the `[oauth2].DEFAULT_APPLICATIONS` parameter in app.ini. The OAuth2 applications registered this way are being marked as "locked" and neither be deleted nor edited over UI to prevent confusing/unexpected behavior. Instead, they're being removed if no longer enabled in config.  The implemented mechanism can also be used to pre-register other OAuth2 applications in the future, if wanted. Co-authored-by: hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> --------- Co-authored-by: M Hickford <mirth.hickford@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This has been resolved by #26291 |
Released https://github.com/hickford/git-credential-oauth/releases/tag/v0.10.0 with universal Gitea support Tested with https://try.gitea.io/ Requires both:
|
@hickford Thanks for that quick implementation! Is anything needed from Gitea's side to also make it happen for Git Credential Manager? |
@denyskon I don't think so. The implementation would be similar to hickford/git-credential-oauth@79a00fb |
Feature Description
It would be really nice if there would be a instance-wide OAuth application only for the purpose of using it with the Git Credential Manager or git-credential-oauth. This would allow Git authentication just work without passwords, personal access tokens or SSH keys.
The OAuth client details for both helpers are redirect URI http://127.0.0.1/, only the client-id needs to be same between all instances.
There is also a similar request to Gitlab: https://gitlab.com/gitlab-org/gitlab/-/issues/374172
Screenshots
No response
The text was updated successfully, but these errors were encountered: