title: Jenkins git checkout stage not able to checkout yml file
body: <p>I have created a jenkins pipeline for an application. I have following stages in my declarative pipeline.</p>
  <ol>
  <li>Checkout</li>
  <li>nuget restore</li>
  <li>sonar scan start</li>
  <li>dotnet build</li>
  <li>sonar scan end</li>
  <li>build docker image</li>
  <li>run container</li>
  <li>deploy on google Kubernetes cluster</li>
  </ol>
  <p>If I don't include 8th step my pipeline works fine, but if I include 8th step my pipeline works only the first time. For the next runs I will get the below error in the first stage.</p>
  <p><a href="https://i.stack.imgur.com/ioJl2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ioJl2.png" alt="enter image description here" /></a></p>
  <p>I have created a windows machine on Azure and running Jenkins on that machine.</p>
  <p>Jenkins file
  stages {</p>
  <pre><code>    stage('Code Checkout') {
          steps {
                 echo 'Cloning project...'
                 deleteDir()
              checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/development']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/shailu0287/JenkinsTest.git']]]
              echo 'Project cloned...'
                 
          }
      }
      
      stage('Nuget Restore') {
          steps {
                echo &quot;nuget restore&quot;
                bat 'dotnet restore \&quot;WebApplication4.sln\&quot;'
          }
      }
      stage('Sonar Scan Start'){
          steps{
              withSonarQubeEnv('SonarQube_Home') {
                      echo &quot;Sonar scan start&quot;
                      echo &quot;${scannerHome}&quot;
                      bat &quot;${scannerHome}\\SonarScanner.MSBuild.exe begin /k:\&quot;Pan33r\&quot; /d:sonar.login=\&quot;squ_e2ecec8e21976c04764cc4940d3d3ddbec9e2898\&quot;&quot;
                  }
          }
      }
      
      stage('Build Solution') {
          steps {
              echo &quot;Build Solution&quot;
                bat &quot;\&quot;${tool 'MSBUILD_Home'}\&quot; WebApplication4.sln /p:Configuration=Release /p:Platform=\&quot;Any CPU\&quot; /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}&quot;
          }
      }
     stage('Sonar Scan End'){
          steps{
              withSonarQubeEnv('SonarQube_Home') {
                   echo &quot;${scannerHome}&quot;
                    echo &quot;sonar scan end&quot;
                   bat &quot;${scannerHome}\\SonarScanner.MSBuild.exe end /d:sonar.login=\&quot;squ_e2ecec8e21976c04764cc4940d3d3ddbec9e2898\&quot;&quot;
                  }
          }
      }
     
      stage('Building docker image') {
          steps{
              script {
                  echo &quot;Building docker image&quot;
                  dockerImage = docker.build registry + &quot;:$BUILD_NUMBER&quot;
              }
          }
      }
      
      stage('Containers'){
          parallel{
              stage(&quot;Run PreContainer Checks&quot;){
                  environment{
                      containerID = &quot;${bat(script: 'docker ps -a -q -f name=&quot;c-Shailendra-master&quot;', returnStdout: true).trim().readLines().drop(1).join(&quot;&quot;)}&quot;
                  }
                  steps{
                      script{
                          echo &quot;Run PreContainer Checks&quot;
                          echo env.containerName
                          echo &quot;containerID is &quot;
                          echo env.containerID
                          
                          if(env.containerID != null){
                              echo &quot;Stop container and remove from stopped container list too&quot;
                              bat &quot;docker stop ${env.containerID} &amp;&amp; docker rm ${env.containerID}&quot;
                          }                         
                      }
                  }
              }
              stage(&quot;Publish Docker Image to DockerHub&quot;){
                  steps{
                      script {
                          echo &quot;Pushing docker image to docker hub&quot;
                          docker.withRegistry( '', registryCredential ) {
                              dockerImage.push(&quot;$BUILD_NUMBER&quot;)
                              dockerImage.push('latest')   
                          }   
                      }                 
                  }
              }
          }    
      } 
       stage('Docker Deployment'){
          steps{
              echo &quot;${registry}:${BUILD_NUMBER}&quot;
              echo &quot;Docker Deployment by using docker hub's image&quot;
              bat &quot;docker run -d -p 7200:80 --name c-${containerName}-master ${registry}:${BUILD_NUMBER}&quot;
          }
  
      }
     stage('Deploy to GKE') {
          steps{
              echo &quot;Deployment started ...&quot;
              step([$class: 'KubernetesEngineBuilder', projectId: env.PROJECT_ID, clusterName: env.CLUSTER_NAME, location: env.LOCATION, manifestPattern: 'Kubernetes.yml', credentialsId: env.CREDENTIALS_ID, verify deployments: true])
          }
      }
      }
     
  </code></pre>
  <p>}</p>
  <p>If I remove the last step, all my builds work fine. If I include the last step, only the first build works fine then I have to restart the machine. I am not sure what is the issue with the YML file.</p>