shipitjs / shipit-deploy

Set of deployment tasks for Shipit based on git and rsync commands.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when uploading file on server

Kignuf opened this issue · comments

Hello,

I'm trying to setup shipit to deploy from either a PC or Mac to my linux server.
Unfortunately I cannot make either to work.

PC:
The problem seems to relate to the "scp" command.
Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "scp -i ~/.ssh/id_rsa /tmp/shipit/myproject.tmp.tar.gz me@myserver.fr:www/myproject/releases/20160408162629" /tmp/shipit/myproject.tmp.tar.gz: No such file or directory

Here is my shipit config
shipit.initConfig({ default: { workspace: './tmp/shipit/myproject', deployTo: './www/geckoboard', repositoryUrl: 'myrepo', ignores: ['.git'], keepReleases: 3, deleteOnRollback: false, key: '~/.ssh/id_rsa' }, prod: { servers: 'me@myserver.fr' } });

If I run the command manually with just a little change, it does work:
scp ./tmp/shipit/geckoboard.tmp.tar.gz kroulleau@dashboard1-infra.webedia.fr:www/geckoboard /releases/test1
The difference is I added a dot "." just before the source path.

Mac:
For some reason, my mac was configured with a space in the hard drive name.
So everything on this computer is saved under "/Volumes/HDD 750/"

I think this might be the cause of the issue:
Command failed: /bin/sh -c rsync --exclude ".git" -az --del -e "ssh " /Volumes/HDD 750/USERS/ME/repo/myproject/app/tmp/shipit/myproject/ me@myserver.fr:www/myproject/releases/20160408164013 rsync: link_stat "/Volumes/HDD" failed: No such file or directory (2) rsync: link_stat "/Volumes/HDD 750/USERS/ME/repo/myproject/app/750/USERS/ME/repo/myproject/app/tmp/shipit/myproject/." failed: No such file or directory (2)

If I run a simplified version of the command, it does work:
rsync -az tmp/shipit/myproject/ me@myserver.fr:dest/

It's probably an issue relative to your Linux / Unix configuration.