Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

引入兼容 Warp 的软链接后,影响了 rsync 的运行 #107

Open
sankoshine opened this issue Apr 16, 2024 · 3 comments
Open

引入兼容 Warp 的软链接后,影响了 rsync 的运行 #107

sankoshine opened this issue Apr 16, 2024 · 3 comments

Comments

@sankoshine
Copy link

创建软链接

sudo ln -sv $(which tssh) /usr/local/bin/ssh

使用 rsync 连接服务器进行文件传输后,报错

protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at /AppleInternal/Library/BuildRoots/ce725a5f-c761-11ee-a4ec-b6ef2fd8d87b/Library/Caches/com.apple.xbs/Sources/rsync/rsync/compat.c(61) [receiver=2.6.9]

删除软链文件即恢复正常

@lonnywong
Copy link
Member

软链后,你试试 rsync -e /usr/bin/ssh ... 能不能正常运行?

@sankoshine
Copy link
Author

软链后,你试试 rsync -e /usr/bin/ssh ... 能不能正常运行?

可以的。

@lonnywong
Copy link
Member

因为 rsync 校验了 openssh 的版本,解决办法只能是指定 openssh 的全路径。
1、你可以执行 rsync 时 rsync -e /usr/bin/ssh ... 这样用。
2、可以建个 alias,如 alias rsync="rsync -e /usr/bin/ssh",但如果你建个 alias 后要再次指定 -e 选项时,就要类似这样 /usr/bin/rsync -e "/usr/bin/ssh -i xxx" ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants