Lagot
Lagot

Reputation: 765

Increase git timeout from jenkins pipeline syntax

I'm getting these messages each time my pipeline syntax command executes on downloading another repo:

ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin

Receiving objects:  77% (6819/8789), 239.50 MiB | 418.00 KiB/s
Killed by signal 15.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

I already tried these two jenkins-auto-generated pipeline syntax, however still fails to completely download the repo

git credentialsId: 'user-key', url: 'ssh://[email protected]:8000/poject/job.git'

git changelog: false, credentialsId: 'user-key', poll: false, url: 'ssh://[email protected]:8000/poject/job.git'

I'm thinking to test and increase the default timeout from 10 minutes to 30 however there is no option from jenkins pipeline syntax to add it.

enter image description here

Any suggestions on how can I increase the timeout value here? Thanks in advance

Upvotes: 3

Views: 3382

Answers (1)

Lagot
Lagot

Reputation: 765

I think it's not on the ssh config of the os that is needed to change. Although I somewhat fixed this by updating our jenkins pipeline syntax:

checkout([$class: 'GitSCM',
    branches: [[name: 'master']],
    doGenerateSubmoduleConfigurations: false,
    extensions: [[$class: 'CleanBeforeCheckout'], [$class: 'CloneOption', depth: 1, noTags: false, reference: '', shallow: true, timeout: 240]],
    submoduleCfg: [],
    userRemoteConfigs: [[credentialsId: 'user-key', url: 'ssh://[email protected]:8000/poject/job.git']]
])

for much higher timeout I set it to 240 (where I saw elsewhere from others settings via google search)

:-)

Upvotes: 3

Related Questions