hexojs / hexo-deployer-rsync

Rsync deployer plugin for Hexo.
MIT License
47 stars 30 forks source link

It doesn't work.. #85

Closed W4J1e closed 1 year ago

W4J1e commented 2 years ago

I have installed cwRsync on my windows server, and telnet ip+port showed everything goes well. But I still cannot deploy my hexo to my server with hexo-deployer-rsync.

deploy:
  type: rsync
  host: 42.193.x.x
  user: rsync
  root: /cygdrive/c/test #this root I also tried "/"
  port: 41026 #I have changed the port
  delete: true
  verbose: true
  ignore_errors: false

But when I made hexo deploy, it showed that:

1

lazy59 commented 2 years ago

I have the same problem as you. as you showed, logs were messy. Maybe, you can use git bash to make hexo deploy. And the problem may occur because you do not add the bin directory to the environment variable. The logs printed like this:

'rsync' is not recognized as an internal or external command,
operable program or batch file.

I recorded my problems on my blog, but I wrote them in Chinese. And I hope you have solved the problem.

W4J1e commented 2 years ago

@lazy59 感谢解答。我是用的vscode,选取的确实是git bash而非powershell。看了您的博客,我想可能是因为我本地电脑没安装也没添加环境变量导致的。我的服务器是winserver,所以好多东西用起来相比linux可能更麻烦。我暂时不打算折腾了,手动复制粘贴可能步骤多一点,但是速度快不丢文件。SFTP就会因为文件占用丢文件,所以才折腾了一下rsync。再次感谢。

stevenjoezhang commented 1 year ago

Windows 默认没有 rsync,用这个插件确实会有些麻烦。可以试试 hexo-deployer-git,或者用 GitHub Actions 直接远程部署。

W4J1e commented 1 year ago

@stevenjoezhang 感谢。这个issue已经过了好久了我忘了关了。后来服务器装debian了,用action推送到服务器的。