-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
No cleanup on authorized_keys file backups #17117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe we should only keep last x backups. |
Suggest having config option similar to CI jobs that provides good flexibility for small installations and large:
|
Note to users: if you experience slow startup times in Kubernetes, this could be the cause. Add a task to delete the '/data/git/.ssh/authorized_keys_*.gitea_bak' files periodically. |
@lunny any update on a fix approach for this one? |
Maybe we should have a cron job to do that. A PR is needed and it should not be very difficult. |
Curiously, why are the backups made? We have a custom task that cleans out 30-50 around every 5 minutes or so. |
workaround for now: [server]
SSH_AUTHORIZED_KEYS_BACKUP = false |
This prevents the disk from overflowing with auth keys file Fixes #17117 ##⚠️ BREAKING This changes the default option for creating a backup of the authorized key file when an update is made to default to false.
Gitea Version
1.12.0
Git Version
2.24.1
Operating System
Debian (Docker)
How are you running Gitea?
We are using the official Docker image.
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
Hello,
When an user adds their SSH key to their profile, Gitea regenerates the
authorized_keys
file and renames the previous one asauthorized_keys_TIMESTAMP.gitea_bak
.In Docker, this folder is located by default in
/data/git/.ssh
.According to Gitea's dashboard, we currently have 17 500 users, with 26 400 public keys and 616 800 repositories.
Here's how it started:
Here's how it's going:
The size of the authorized_keys backups has reached 1 To:
Can Gitea somehow cleanup its backups on a regular basis, while keeping the last X backups (e.g.: 50) ?
We have the opportunity to test Gitea in a large-scale organization, and up until now we're satisfied with it, it's very performant even though we have a lot of users:
I believe it only needs some minor adjustments to be scalable without issues, and this authorized_keys backup issue is one of those.
Do you think this issue can be fixed in Gitea ?
Thanks!
Screenshots
No response
The text was updated successfully, but these errors were encountered: