Skip to content

Commit 36d351e

Browse files
authored
Merge pull request #800 from cmruffin/master
gitea: support git credential manager oauth flow
2 parents d9d43d4 + ad244cf commit 36d351e

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

gitea.subdomain.conf.sample

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2025/07/18
1+
## Version 2026/07/03
22
# make sure that your gitea container is named gitea
33
# make sure that your dns has a cname set for gitea
44
# edit the following parameters in /data/gitea/conf/app.ini
@@ -57,6 +57,18 @@ server {
5757

5858
}
5959

60+
# support for git credential manager. don't proxy a redirect to localhost in the oauth flow.
61+
location /login/oauth/grant {
62+
proxy_redirect ~^http://127.0.0.1(.*) http://127.0.0.1$1;
63+
include /config/nginx/proxy.conf;
64+
include /config/nginx/resolver.conf;
65+
set $upstream_app gitea;
66+
set $upstream_port 3000;
67+
set $upstream_proto http;
68+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
69+
70+
}
71+
6072
location ~ (/gitea)?/(api|info/lfs) {
6173
include /config/nginx/proxy.conf;
6274
include /config/nginx/resolver.conf;

0 commit comments

Comments
 (0)