Bump version to 1.0.22
This commit is contained in:
@@ -261,17 +261,22 @@ func (e *Engine) Run(ctx context.Context, jobID int64, pairID int64) error {
|
||||
|
||||
var result *RsyncResult
|
||||
if isRemoteToRemote(srcMachine, dstMachine) {
|
||||
destPrivKey, err := e.resolveSSHKey(dstMachine)
|
||||
destPrivKeyPath, err := e.resolveSSHKey(dstMachine)
|
||||
if err != nil {
|
||||
slog.Warn("failed to resolve destination SSH key, using server key", "error", err)
|
||||
destPrivKey = filepath.Join(e.cfg.SSHDir(), "id_ed25519")
|
||||
destPrivKeyPath = filepath.Join(e.cfg.SSHDir(), "id_ed25519")
|
||||
}
|
||||
destPrivKeyBytes, err := os.ReadFile(destPrivKeyPath)
|
||||
if err != nil {
|
||||
slog.Warn("failed to read destination SSH key, using empty", "error", err)
|
||||
destPrivKeyBytes = []byte{}
|
||||
}
|
||||
result, err = runner.RunRemote(jobCtx, cfg, RemoteMachine{
|
||||
Host: srcMachine.Host,
|
||||
Port: srcMachine.Port,
|
||||
SSHUser: srcMachine.SSHUser,
|
||||
PrivKey: privKey,
|
||||
DestPrivKey: destPrivKey,
|
||||
DestPrivKey: string(destPrivKeyBytes),
|
||||
}, onLine)
|
||||
} else {
|
||||
result, err = runner.Run(jobCtx, cfg, onLine)
|
||||
|
||||
Reference in New Issue
Block a user