On my server I have dockerised traefik as reverse proxy (which also does TLS termination), and dockerised gitea. I can access gitea’s frontend successfully.
I want to use HTTPS (not SSH) for git actions.
But when I try to push from my local machine to the remote server I get:
$ git push -u origin master
Username for 'https://gitea.example.com': username
Password for 'https://gitea.example.com':
remote: Unauthorized
fatal: Authentication failed for 'https://gitea.example.com/username/test.git'
That’s weird because I use the same username/password to login to the frontend, without problems.
Does someone have a working example configuration for this? (docker + traefik/nginx/etc. + gitea + HTTPS)
Nope I don’t use 2FA. It’s a fresh install with nothing extra.
I just want HTTPS access instead of SSH. But it rejects all my git cli commands even though my user/pass is correct (I can use them to log in to the frontend).
Having the same issue. At first I was blaming the authentication provider I had setup with my Gitea instance, but after some more debugging it seems to also fail on local accounts.
Both for HTTP and HTTPS access through Traefik I get 401s, but when I access the Gitea isntance directly via its exposed port the clone works just fine.
Note that my configuration explicitly disables password auth for the API and HTTP git (and includes a workaround to prevent local login on web interface), so my users need to setup personal access tokens and login via SSO IdP.