Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add restrict option to authorized keys #69

Merged
merged 6 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.12.0
rev: v3.13.0
hooks:
- id: commitizen
stages:
Expand All @@ -24,7 +24,7 @@ repos:
- -t
- warning
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.38.0
hooks:
- id: markdownlint-fix
args:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [2.2.0-rc.1](https://github.com/AnotherStranger/docker-borg-backup/compare/v2.1.5-rc.1...v2.2.0-rc.1) (2023-12-13)


### Features

* :recycle: 🔀 Merge pull request [#68](https://github.com/AnotherStranger/docker-borg-backup/issues/68) from Spice-King/patch-1 ([34a827a](https://github.com/AnotherStranger/docker-borg-backup/commit/34a827acb9b652731fc5ebbbfc508781c7da4260))

## [2.1.5-rc.1](https://github.com/AnotherStranger/docker-borg-backup/compare/v2.1.4...v2.1.5-rc.1) (2023-12-13)


### Code Refactoring

* **deps:** :arrow_up: update pre-commit hooks ([7f30ae0](https://github.com/AnotherStranger/docker-borg-backup/commit/7f30ae0d641592d487e70647407c9f1694b52095))

## [2.1.4](https://github.com/AnotherStranger/docker-borg-backup/compare/v2.1.3...v2.1.4) (2023-12-09)


Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

# if BORG_AUTHORIZED_KEYS is set substitute authorized_keys file
if [ -n "${BORG_AUTHORIZED_KEYS+x}" ]; then
echo -e "${BORG_AUTHORIZED_KEYS}" | sed -e "s/^/command=\"borg serve ${BORG_SERVE_ADDITIONAL_ARGS} --restrict-to-path \/home\/borg\/backups\" /" >/home/borg/.ssh/authorized_keys
echo -e "${BORG_AUTHORIZED_KEYS}" | sed -re "/^\\s*(\$|#)/! s/^/restrict,command=\"borg serve ${BORG_SERVE_ADDITIONAL_ARGS} --restrict-to-path \/home\/borg\/backups\" /" >/home/borg/.ssh/authorized_keys
fi
chown borg:borg /home/borg/.ssh/authorized_keys
chmod og-rwx /home/borg/.ssh/authorized_keys
Expand Down
Loading