Running .sh file says "no such file or directory" even though it exists


.yml Code:

platform: linux
type: docker-image
repository: busybox
tag: latest

  • name: Testing
    path: ./Testing/ code:

cat Hello.txt

Error (Image):


It looks like you don’t have tar in your environment. fly is looking for it in /usr/bin/ but can’t find it.


On a related note, the requirement to have tar installed on windows should be going away in 4.0-


I’m not using linux, i’m running concourse on windows 10 using Docker


What matters for fly execute is the system you’re running fly from, not the OS the actual Concourse is running from. The error you’re seeing is because tar is not found in your machines’s PATH.


Now, i have completely modified the code & removed all the errors. This new code is supposed to run a Simple Java Program.
java.yml code (image):
image code (image):


I have hijacked the container and it shows my git-repo (resource name) & all the files present in the repository.

Conatiner Details (Image):


When you hijack you are choosing to enter the get container not the task choose option 2 instead then investigate that container.


Here is the Details of Container 2



Its probably something to do with file paths or file permissions. I’m not familiar with javac but try running ./git-repo/ from the directory the hijack first drops you into (/tmp/build/fbb96911 in the screenshot above).


@crsimmons i updated it to ./git-repo/ still it’s taking into /tmp/build/fbb96911/


I think you misunderstood. Run the command ./git-repo/ from the directory /tmp/build/fbb96911/ and see what happens.

Your pipeline looks like its set up correctly so I think this is a problem with your script rather than a Concourse issue.


From the container i have ran ./git-repo/


All I can suggest is trying to get it to work in the container then make the necessary changes to your script/pipeline to make it pass in general.

Since it doesn’t work in the container this is not a Concourse problem.


from the container if i do cd git-repo & ./ it works fine.


So in your script you need to make sure the working directory is set to the directory of the script before running javac.

Something like this.


cd “$(dirname “$0”)” if i use this command it’s going directly into usr/bin directory.
i’m using Git Bash on Windows.
Can u please write the command to include before javac line in script (


If you modify the script in the hijacked container then run ./git-repo/ from /tmp/build/fbb96911/ I would expect cd “$(dirname “$0”)” to work. If it doesn’t you’re going to have to find something that does. There isn’t really anything else I can suggest.


Its not working :triumph: !!


I just tried it myself. From the hijacked container I changed the script to be:

$ cat git-repo/
cd "$(dirname "$0")"
java samp

The I ran:

$ ./git-repo/
Hello World

Seems to be working fine.


Ya thanks, now its working very well.
You are the only one who spotted the mistake.