结构rsync:读取错误:对等连接重置(104)

时间:2018-12-17 23:46:09

标签: python django windows rsync fabric

我正在尝试使用FABRIC将Python / Django / Mezzanine网站部署为DO。

我的开发环境是带有Ubuntu WSL的Windows 10

我已检查服务器,并且/ mezzanine / my_cms存在

运行fab create时出现错误

dup() in/out/err failed
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at 
/usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8]

Fatal error: local() encountered an error (return code 12) while executing 
'rsync  --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude 
".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude 
"/static" --exclude "/.git" --exclude "/.hg" -pthrvz  --rsh='ssh  -p 22  ' 
/c/WebDev/site_env/my_cms/ 
saleh_cms@123.456.789.012:/home/saleh_cms/mezzanine/my_cms'

Aborting.
Disconnecting from 123.456.789.012... done.

如果我尝试手动运行rsync

rsync  --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude 
".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude 
"/static" --exclude "/.git" --exclude "/.hg" -pthrvz  --rsh='ssh  -p 22  ' 
/c/WebDev/site_env/my_cms/ 
saleh_cms@123.456.789.012:/home/saleh_cms/mezzanine/my_cms'

我收到以下错误

源和目标不能都是远程的。    rsync错误:/ usr / src / rsync / rsync-中的语法或使用错误(代码1)    3.0.8 / main.c(1148)[Receiver = 3.0.8]

我对路径/ c / WebDev / site_env / my_cms /进行了硬编码,以避免使用rsync解释为远程主机的冒号

如果有人能指出我正确的方向,将不胜感激。

1 个答案:

答案 0 :(得分:0)

在运行rsync命令之前,先插入/c/WebDev/site_env/my_cms/中的CD。然后运行:

rsync  --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude 
".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude 
"/static" --exclude "/.git" --exclude "/.hg" -pthrvz  --rsh='ssh  -p 22  ' 
. saleh_cms@123.456.789.012:/home/saleh_cms/mezzanine/my_cms'

(相同的命令,但将本地目录替换为一个点)