[PR #1856] [MERGED] Setting to disable authorized_keys backup #16088

Closed
opened 2025-11-02 12:02:01 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1856
Author: @dnmgns
Created: 6/2/2017
Status: Merged
Merged: 6/28/2017
Merged by: @lunny

Base: masterHead: disable_authorized_key_backup


📝 Commits (10+)

  • bf51dd0 Add setting to disable authorized_keys backup when rewriting public keys
  • 78314cc Update default value to comply with documentation
  • 714e98b Use tmp-file instead of bak-file for saving manually added keys.
  • de19116 Change casing
  • 15b88b7 Change casing and build bakpath with sprintf only
  • cbf811a Only close file once
  • 80a106c Do not modify calcFingerprint
  • 078f2a6 Fix casing
  • 56b37ad Change style from disable to enable
  • 4bd7c2b Change name, just SSH_BACKUP_AUTHORIZED_KEYS

📊 Changes

3 files changed (+35 additions, -31 deletions)

View changed files

📝 conf/app.ini (+2 -0)
📝 models/ssh_key.go (+20 -20)
📝 modules/setting/setting.go (+13 -11)

📄 Description

When using LDAP User Synchronization (#1478) with LDAP Public SSH Keys synchronization (#1844), the authorized_keys backup might be running with a quite high frequency (as it's called every time when rewriting public keys).

The system could end up with lots of backup-files causing inode issue and running out of free space.

This PR addresses this issue by giving the administrator the option to disable the authorized_keys backup when rewriting the public keys. This enables the administrator to perform the backup on his own outside of Gitea instead, or simply skip the backup as the keys are already stored in LDAP.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1856 **Author:** [@dnmgns](https://github.com/dnmgns) **Created:** 6/2/2017 **Status:** ✅ Merged **Merged:** 6/28/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `disable_authorized_key_backup` --- ### 📝 Commits (10+) - [`bf51dd0`](https://github.com/go-gitea/gitea/commit/bf51dd049a7c70bc7f4a8e97985fc148b38c0a1d) Add setting to disable authorized_keys backup when rewriting public keys - [`78314cc`](https://github.com/go-gitea/gitea/commit/78314cc1cdbcf2ba88bcf124de578c3b830af085) Update default value to comply with documentation - [`714e98b`](https://github.com/go-gitea/gitea/commit/714e98b36064ad2664fedac99b494debca683fae) Use tmp-file instead of bak-file for saving manually added keys. - [`de19116`](https://github.com/go-gitea/gitea/commit/de19116cde221a546c7c9bb94dcb2d53ce21435a) Change casing - [`15b88b7`](https://github.com/go-gitea/gitea/commit/15b88b7964a89baf5e2d281ea2bd28e29d874c00) Change casing and build bakpath with sprintf only - [`cbf811a`](https://github.com/go-gitea/gitea/commit/cbf811ac3dadaa393893c8204b4dbde921dbe369) Only close file once - [`80a106c`](https://github.com/go-gitea/gitea/commit/80a106c082e0223838761e4c86a94501e628f8fd) Do not modify calcFingerprint - [`078f2a6`](https://github.com/go-gitea/gitea/commit/078f2a630651e7ee8d0d0fd30e9daf6fc9035b81) Fix casing - [`56b37ad`](https://github.com/go-gitea/gitea/commit/56b37ad194677c40ee36852990048f260b1005cd) Change style from disable to enable - [`4bd7c2b`](https://github.com/go-gitea/gitea/commit/4bd7c2bc5ba3acbcd39ec925458cce53268673c8) Change name, just SSH_BACKUP_AUTHORIZED_KEYS ### 📊 Changes **3 files changed** (+35 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `conf/app.ini` (+2 -0) 📝 `models/ssh_key.go` (+20 -20) 📝 `modules/setting/setting.go` (+13 -11) </details> ### 📄 Description When using LDAP User Synchronization (#1478) with LDAP Public SSH Keys synchronization (#1844), the authorized_keys backup might be running with a quite high frequency (as it's called every time when rewriting public keys). The system could end up with lots of backup-files causing inode issue and running out of free space. This PR addresses this issue by giving the administrator the option to disable the authorized_keys backup when rewriting the public keys. This enables the administrator to perform the backup on his own outside of Gitea instead, or simply skip the backup as the keys are already stored in LDAP. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:02:01 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16088