Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
name: Validation
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
env:
SSHDOL_SYNC_TO_EXTRA_SSH_OPTIONS: "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
strategy:
matrix:
python-version: ["3.10"]
Expand Down
7 changes: 7 additions & 0 deletions sshdol/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,13 @@ def sync_to(
ssh_parts = ["ssh", "-p", str(self._conn_port)]
if self._conn_key_filename:
ssh_parts += ["-i", self._conn_key_filename]

# Add extra SSH options from environment variable if set
# This allows CI environments or users to specify additional SSH options
extra_ssh_options = os.environ.get('SSHDOL_SYNC_TO_EXTRA_SSH_OPTIONS')
if extra_ssh_options:
# Split the string into individual options, handling quoted arguments properly
ssh_parts += shlex.split(extra_ssh_options)
ssh_cmd_str = " ".join(shlex.quote(p) for p in ssh_parts)

# Build rsync args
Expand Down
Loading