2

I was successfully able to build in Jenkins by using the below Script till yesterday. But suddenly from today I am not able to build the project. I am getting timeout while cloning the project from GIT.

Pipeline script :

stages {
  stage ('Initialize') {
    steps {
      git url: 'http://xx.xx.xx.xx/gitlab/tata-comm-oss/oss-fe.git',
          credentialsId: 'xxxx-xxx-xx-xxxxxx',
          branch: 'alpha_06_1'
    }
  }
}

I am getting below error.

ERROR: Timeout after 10 minutes

ERROR: Error cloning remote repo 'origin'

How to increase the timeout for git fetch (not general timeout) in my pipeline script mentioned above so that jenkins can clone the project from GIT.

Surya
  • 604
  • 1
  • 6
  • 25
  • Does this answer your question? [How to add a timeout step to Jenkins Pipeline](https://stackoverflow.com/questions/38096004/how-to-add-a-timeout-step-to-jenkins-pipeline) – Chris Maes Mar 18 '21 at 12:38
  • 1
    No Chris, I want to increase the timeout for git fetch / clone. No general timeout. – Surya Mar 18 '21 at 12:41
  • Instead of `git` try using `checkout` which also supports git. You can generate the exact pipeline command at `http:///pipeline-syntax/`, look for "Advanced checkout behaviors". – MaratC Mar 18 '21 at 15:05

0 Answers0