From 2cca3d5403eb3bdc8a4990f3b01149c01e5fb52e Mon Sep 17 00:00:00 2001 From: DeadSwitch Date: Tue, 10 Feb 2026 13:36:42 +0100 Subject: [PATCH] Fixed the SSH clone issue. The git user needs shell and a disabled password. --- tasks/main.yml | 3 ++- templates/gitea.j2 | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 7011614..1d194de 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -76,7 +76,8 @@ name: "{{ gitea_user }}" group: "{{ gitea_group }}" home: /home/{{ gitea_user }} - shell: /usr/sbin/nologin + shell: /bin/bash + password: '*' system: true create_home: true diff --git a/templates/gitea.j2 b/templates/gitea.j2 index d586233..33c446c 100644 --- a/templates/gitea.j2 +++ b/templates/gitea.j2 @@ -14,14 +14,14 @@ server { client_max_body_size 50M; location / { - proxy_pass http://127.0.0.1:{{ gitea_http_port }}; + client_max_body_size 512M; + proxy_pass http://localhost:{{ gitea_http_port }}; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - - proxy_read_timeout 90; - proxy_connect_timeout 90; } } @@ -42,14 +42,14 @@ server { client_max_body_size 50M; location / { - proxy_pass http://127.0.0.1:{{ gitea_http_port }}; + client_max_body_size 512M; + proxy_pass http://localhost:{{ gitea_http_port }}; + proxy_set_header Connection $http_connection; + proxy_set_header Upgrade $http_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - - proxy_read_timeout 90; - proxy_connect_timeout 90; } } {% endif %}