Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Makefile and rsync error: Failed to exec ssh: No such file or directory

Tags:

makefile

rsync

I'm trying to publish local files on a mac to my server using rsync and a makefile. When running the make command i get the following error:

rsync: Failed to exec ssh: No such file or directory (2)  
rsync error: error in IPC code (code 14) at /SourceCache/rsync/rsync-42/rsync/pipe.c(86)   [sender=2.6.9]  
rsync: connection unexpectedly closed (0 bytes received so far) [sender]  
rsync error: error in IPC code (code 14) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]  
make: *** [deploy] Error 14  

Strange thing is, the rsync command will work if i enter it directly in the shell.

Here's the interesting parts of the makefile:

USER = admin  
SERVER = 92.243.xx.xx  
PATH = d_ghost1/www/sub.domain.de/htdocs/  

deploy:  
    /usr/bin/rsync -avz \  
    --exclude '.git*' \  
    --exclude '.DS*' \  
    --exclude '*.log' \  
    --exclude 'config.ini\*' \  
    --exclude 'backend/config.ini\*' \  
    ./{assets,backend,frontend,templates,waffle} $(USER)@$(SERVER):$(PATH)  

Can anyone make sense of this? Thanks, Lutz

like image 877
user2373001 Avatar asked Oct 09 '13 00:10

user2373001


1 Answers

I experienced the same error recently on a Ubuntu 18.04 docker image. Installing the openssh-client package, as suggested here solved issue for me.

sudo apt install -y openssh-client

like image 101
Dirc Avatar answered Oct 01 '22 11:10

Dirc