Closed
Description
- Gitea version (or commit ref):
1546458
(listed in the footer) - Git version:
git version 2.17.0
- Operating system: osx
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
I am trying to push/clone repos in gitea. My previous configuration worked in gogs
Steps
- I am proxy passing
http://127.0.0.1:3000
to ->https://test.example.com
with a valid ssl cert. - Users are authenticated with ldap only
- I Create a private repo with the gogs UI.
https://test.example.com/test/test.git
- I try to push to it with
https://test.example.com/test/test.git
- I try to push to it as the user
https://[email protected]/test/test.git
Both 4/5 result in:
remote: reverse proxy login error. authUsername empty
nginx config
location / {
proxy_pass http://127.0.0.1:3000;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
fastcgi_param X-WEBAUTH-USER $remote_user;
client_max_body_size 50m;
# Force https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
more_clear_input_headers 'Accept-Encoding';
}
app.ini
...
[service]
ENABLE_REVERSE_PROXY_AUTHENTICATION = true
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = true
...