Error While Running .sh file as a Part of YML file


Here is the code.
java.yml code:

platform: linux

type: docker-image
repository: openjdk
tag: 8-jdk

path: C:\Users\I355480\Desktop\Java\ code:

#!/usr/bin/env sh
java samp

Note: All the files are in the same folder (java.yml,,
This is the error i’m getting (see image).



i think there is some misunderstanding here in how the Bash script comes into your task container.

path: C:\Users\I355480\Desktop\Java\

Thats the local path under which your bash script resides on your computer. But Concourse instead runs your tasks in a docker container.

For the docker container to be able to execute the script, it first needs to mount the resources that are required for this.

In the Concourse world this is done via Concourse Resources. In your case, you could e.g. put your Bash script into a Github Repo and let Concourse receive it from there using the Concourse-Git-Resource.

To see how you can work with resources and reference them in your Jobs and Tasks checkout this tutorial Pipeline-Resources.



okay then, ill upload my code into the git repo and using “get” i’ll get my repo and will execute again.
Am i correct ?


Yes, you must declare the Repo Resource in your Job using the get directive and then in your task you have to define it as input.

Afterwards you will have the resource in your container under the current root directory and can execute any script that you have in your Git Repo.

This way you can execute your scripts on any system as Concourse always knows how to receive them from Github using the Git-Resource.



I’ll complete my code and i’ll post it here about the result.
Thank you so much for helping me out.


Still i’m getting the same error.
Here is the modified code:

  • name: git-repo
    type: git
    branch: master
  • name: run-java
    public: true
    • get: git-repo
    • task: hello-world
      platform: linux
      type: docker-image
      repository: openjdk
      tag: 8-jdk
      - name: git-repo
      path: ./git-repo/
      Here is the error on web-ui (image):


i think it should be like this “git-repo/”.

You can also checkout your docker container which runs the task by using the fly hijack command.



Sorry, it is in the same way as you mentioned (git-repo/
What should i do now ? How to rectify this error ?


i recommend you hijack (login into the container) and check if you can find your resource:

fly -t <your concourse target> -j <pipeline-name>/<job-name>



This is the Output:


I can see my resource name “git-repo”.


@marco-m are you there ? Please look at this issue as well.


inspect the hello-world task.

When you are logged into the container check with ls if you can see a folder containing your bash script.


@gdenn This is Sathwik (7thwik) i have reached max no of replies on Day 1 and i can’t reply through my account, please ping me here, so that we can continue…


I suggest you use the Concourse discord then Join us in Discord!