rsync 指令,使用remote-shell mode,直接在shell裡執行一切安好
rsync -arzh -e 'ssh -i ~/.ssh/abc' /sh-test/job 'abc@sh-test.sc.gcp:~'
使用 jenkins 跑出
ERROR: script returned exit code 14
寫被selinux 檔住
semanage boolean -l | grep rsync
查rsync可調整的部份
rsync_anon_write (off , off) Allow rsync to anon write
rsync_client (off , off) Allow rsync to client
rsync_export_all_ro (off , off) Allow rsync to export all ro
rsync_full_access (off , off) Allow rsync to full access
setsebool -P rsync_full_access 1
再執行,發現錯誤不同了,沒有權限執行ssh
label不對
再調整 rsnyc_client
setsebool -P rsync_client 1
成功