-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
My first post in this repo, so thank all you maintainers for your time spent working on this - much apprecheated!!
We are using gitea within a docker environment. In general we configure gitea through the docker-compose.yaml file.
Enabling LFS with gitea was not a problem and so far its working. LFS-attributed file move to our specified directory (/lfs) and our git clients recognise the LFS-attributed files.
We have a problem with setting up the cronjob for GC not needed LFS-files.
In docker-compose we add these lines:
environment:
- GITEA__CRON.GIT_GC_REPOS__ENABLED=true
- GITEA__CRON.GIT_GC_REPOS__RUN_AT_START=true
- GITEA__CRON.GIT_GC_REPOS__SCHEDULE=@weekly
These translate to the following in /etc/gitea/app.ini in the container:
SCHEDULE = @weekly
ENABLED = true
RUN_AT_START = true
OLDER_THAN = 240h
But after restarting gitea the cronjob should run, which is not the case:
After starting it manually it seems to have run - but no action was taken, since no LFS files have been deleted from /lfs
.
We setup some test repos with LFS files which we deleted before running the cron job.
The last line from the log file seems to be related. But nothing is written to log during the cron job. I try to change the log level and report more detailed information later on.
2024/05/27 13:42:05 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 8
2024/05/27 13:42:05 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.21.11 built with GNU Make 4.4.1, go1.21.9 : bindata, timetzdata, sqlite, sqlite_unlock_notify
2024/05/27 13:42:05 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
2024/05/27 13:42:05 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
2024/05/27 13:42:05 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea
2024/05/27 13:42:05 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom
2024/05/27 13:42:05 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini
2024/05/27 13:42:05 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server
2024/05/27 13:42:05 routers/init.go:112:InitWebInstalled() [I] Git version: 2.40.1, Wire Protocol Version 2 Enabled (home: /var/lib/gitea/home)
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table system_setting Column version db default is , struct default is 1
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table gpg_key Column content db nullable is true, struct nullable is false
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table gpg_key_import Column content db nullable is true, struct nullable is false
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table public_key Column content db nullable is true, struct nullable is false
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table project column board_type db type is INT(10) UNSIGNED, struct type is INT UNSIGNED
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table project column card_type db type is INT(11), struct type is INT UNSIGNED
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table project Column card_type db default is 0, struct default is
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table project Column card_type db nullable is false, struct nullable is true
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table project column type db type is INT(10) UNSIGNED, struct type is INT UNSIGNED
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table hook_task has column repo_id but struct has not related field
2024/05/27 13:42:06 cmd/web.go:194:serveInstalled() [W] Table label Column archived_unix db default is , struct default is NULL
2024/05/27 13:56:56 ...rvices/lfs/server.go:544:authenticate() [W] Authentication failure for provided token with Error: no token
Gitea Version
1.21.11 built with GNU Make 4.4.1, go1.21.9
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.40.1, Wire Protocol Version 2 Enabled
Operating System
Ubuntu 22.04.4 LTS
How are you running Gitea?
Docker 26.0.0 with compose file behind a reverse nginxX proxy
Nginx Config
server{
listen 80;
server_name mylocaldomain.local;
location / {
return 301 https://$host$request_uri;
}
}
upstream gitea_backend{
server gitea:3000;
keepalive 32;
}
server {
listen 443 ssl;
server_name mylocaldomain.local;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
ssl_session_timeout 1d;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_certificate /etc/ssl/certs/*.crt;
ssl_certificate_key /etc/ssl/private/*.key;
location / {
client_max_body_size 9000m;
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-Host $server_name;
proxy_pass http://gitea_backend;
}
}
Database
MySQL/MariaDB