Jenkins: git fetch gets JenkinsFile but then Jenkins can't find it
<p>I have a pipeline set-up in Jenkins using a JenkinsFile stored in our bitbucket git repo. When I build it it fails with the error below. When I check the file system I see that the file is there. If I change the file and push to the remote repo and build again I see the file update on the file system. I get the same failure however. Has anyone encountered something similar?</p>

<p>Jenkins ver. 2.10</p>

<p>Java ver. 1.8.0_91-b14</p>

<pre><code>Started by user Erol Suleyman
 &gt; git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 &gt; git config remote.origin.url https://bitbucket.xxx.xxx/scm/cha/jenkins-pipeline.git # timeout=10
Fetching upstream changes from https://bitbucket.xxx.xxx/scm/cha/jenkins-pipeline.git
 &gt; git --version # timeout=10
using .gitcredentials to set credentials
 &gt; git config --local credential.username esuleyman # timeout=10
 &gt; git config --local credential.helper store --file=/tmp/git6615956696298607518.credentials # timeout=10
Setting http proxy: xxxxxxxx.xxxxxx.com:8080
 &gt; git -c core.askpass=true fetch --tags --progress https://bitbucket.xxx.xxx/scm/cha/jenkins-pipeline.git +refs/heads/*:refs/remotes/origin/*
 &gt; git config --local --remove-section credential # timeout=10
 &gt; git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 &gt; git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 8f5a9f8f376a1a7ddd5dd23c533286cf511fba6f (refs/remotes/origin/master)
 &gt; git config core.sparsecheckout # timeout=10
 &gt; git checkout -f 8f5a9f8f376a1a7ddd5dd23c533286cf511fba6f
 &gt; git rev-list 77448171a2b76eb268d7415e1b3c524f10219e22 # timeout=10
ERROR: /u01/appl/jenkins/workspace/SoapUI/test-git-pipeline@script/lab_4a/complete_list/test/Jenkinsfile not found
Finished: FAILURE
</code></pre>