Why does the cd command not work via ssh on the GOCD?

Asked

Viewed 112 times

1

I’m trying to run the command down at the terminal GOCD, but always the error occurs:

Commando

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 cannot run. And there is already the ssh connection without password between the two.

Even running only the cd, without the command docker-compose, error occurs.

  • Try it this way: ssh root@host '/var/www/Gda-frontend/Docker-Compose up -d --build' P.s: I can’t comment on why I posted it as a question.

1 answer

0


I couldn’t see anything wrong, if the directory really exists. With the connection established, confirm that the directory actually exists and that its name is correct:

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

The answer error 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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.