Skip to content

Commit

Permalink
Change default value for SSH identity file (#108)
Browse files Browse the repository at this point in the history
* Change default value for SSH identity file

* Force remove write protected file in tests
  • Loading branch information
m90 authored Jun 17, 2022
1 parent 0b205fe commit 1892d56
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ You can populate below template according to your requirements and use it as you
# SSH_PASSWORD="password"

# The private key path in container for SSH server
# Default value: /root/.ssh/id
# If file is mounted to /root/.ssh/id path it will be used.
# Default value: /root/.ssh/id_rsa
# If file is mounted to /root/.ssh/id_rsa path it will be used. Non-RSA keys will
# also work.

# SSH_IDENTITY_FILE="/root/.ssh/id"
# SSH_IDENTITY_FILE="/root/.ssh/id_rsa"

# The passphrase for the identity file

Expand Down
2 changes: 1 addition & 1 deletion cmd/backup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Config struct {
SSHPort string `split_words:"true" default:"22"`
SSHUser string `split_words:"true"`
SSHPassword string `split_words:"true"`
SSHIdentityFile string `split_words:"true" default:"/root/.ssh/id"`
SSHIdentityFile string `split_words:"true" default:"/root/.ssh/id_rsa"`
SSHIdentityPassphrase string `split_words:"true"`
SSHRemotePath string `split_words:"true"`
ExecLabel string `split_words:"true"`
Expand Down
2 changes: 1 addition & 1 deletion test/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
SSH_IDENTITY_PASSPHRASE: test1234
volumes:
- ./local:/archive
- ./id_rsa:/root/.ssh/id
- ./id_rsa:/root/.ssh/id_rsa
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock

Expand Down
2 changes: 1 addition & 1 deletion test/compose/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ fi
echo "[TEST:PASS] Local backups have not been deleted."

docker-compose down --volumes
rm id_rsa id_rsa.pub
rm -f id_rsa id_rsa.pub

0 comments on commit 1892d56

Please sign in to comment.