/etc/profile
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2]
经过排查,发现是因为我在/etc/profile里面添加了echo “ddd”
这是由于 shell 的登录内容在非交互式 shell 上输出内容造成的。
删除echo "ddd"即可