Git Clone Error:

[Solution] Git Clone Error: error=2, No such file or directory


In Jenkins, when I am trying to clone a git repository I am getting the following error.


This is a common issue which occurs when you are configuring a new Jenkins or configuring it for the first time.

Make sure you have the following settings already configured. It could be because of these reasons as well.

  1. Git should be installed on the slave where you are trying to clone the repo.
  2. Your git repo should be accessible from the slave machine.
  3. You should have Git Plugin installed on Jenkins

If the above prerequisites are met and you are getting the error, then is a Jenkins git configuration issue. You need to configure git on Jenkins.

Jenkins Git Configuration

Step 1: Login to your slave machine and get the git executable path using the following command.

You should see something as shown below.

/bin/git is the git executable location

Step 2: Go to Manage Jenkins –> Global Tool Configuration

Step 3: Add the git executable path you got in Step 1 as shown below.

Thats it! now if you build your Jenkins jobs, you should not see the error! Please comment below if you think there are more edge cases in this type of errors.


Q: When I try to use images using "insert into post" option, WordPress is giving a blank page and the image is not…

Read more

Rails form_for helper used the active record class for handling the forms and saving to database. However in some cases…

Read more

1. If, else and ifelse:[crayon-5cebbb5f9b5e3938581028/]2. Conditional statement using ternary…

Read more

The Best Tutorials & Tips to Speedup Your DevOps Workflow.

Created by Bibin Wilson.