Skip to content

Gitea + LFS + Ngnix Basic Auth help #5708

Answered by alatnet
alatnet asked this question in Q&A
Discussion options

You must be logged in to vote

ok, i think i got it working!

    location ^~ /gitea/ {
        auth_basic "Administrator’s Area";
        auth_basic_user_file /etc/nginx/.htpasswd;

        allow all;

        location ~ /gitea/[\w\.]+/[\w\.]+/info/lfs {
                auth_basic off;
                client_max_body_size 512M;

                # make nginx use unescaped URI, keep "%2F" as is
                rewrite ^ $request_uri;
                rewrite ^/gitea(/.*) $1 break;

                proxy_pass http://gitea$uri;

                proxy_set_header Connection $http_connection;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Host $host;
                proxy_set_header X-…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@alatnet
Comment options

@bk2204
Comment options

@alatnet
Comment options

@alatnet
Comment options

Answer selected by alatnet
@alatnet
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants