Why does the 'cd' command not work via ssh in GOCD?

1

I'm trying to run the command below in the GOCD terminal, but the error always occurs:

Command

ssh root@host 'cd /var/www/gda-frontend/ && docker-compose up -d --build'

Error

  

bash: cd / var / www / gda-frontend / & docker-compose up -d --build: File or directory not found

The directory exists, but it can not rotate. And there is already the connection via ssh without a password between the two.

Even if you run only cd , without the docker-compose command, the error occurs.

    
asked by anonymous 04.07.2017 / 20:52

1 answer

0

I could not see anything wrong, if the directory really exists. With the connection established, confirm that the directory actually exists and that the directory name is correct:

ssh root@host 'cd /var/www/ && ls'

The error response is quite clear 'File or directory not found'. It may be that the directory is in '/ var / www / html / gda-frontend /', but now it's just my guess.

    
07.07.2017 / 01:20