Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36849

Github organization folder plugin fetch timeouts

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • jenkins 2.14
      github-orgganization-folder-plugin 1.3
      Branch API plugin 1.10
      GitHub Branch Source Plugin 1.8.1
      Folders Plugin 5.12
      Pipeline Multibranch 2.8

      I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

      my Jenkinsfile looks like this:

      node("*Not_master_node*")
      {
            checkout(
                   [$class: 'GitSCM', 
      			branches: [[name: "${env.BRANCH_NAME}"]], 
      			doGenerateSubmoduleConfigurations: false, 
      			extensions: 
      			[
      				[$class: 'CleanBeforeCheckout'],
      				[$class: 'CheckoutOption', timeout: 180], 
      				[$class: 'CloneOption', 
      					depth: 0, 
      					noTags: false, 
      					shallow: true, 
      					timeout: *180*
      				]
                                ], 
      					submoduleCfg: [], 
      					userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
      				)
      }
      

      I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

      'github organization':

      Started by user (...)
      Connecting to https://api.github.com using (...)
      > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from 2 remote Git repositories
      > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
      Fetching upstream changes from https://github.com/(...).git
      > /usr/bin/git --version # timeout=10
      using .gitcredentials to set credentials
      > /usr/bin/git config --local credential.username (...) # timeout=10
      > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
      > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/:refs/remotes/origin/

      ERROR: Timeout after 10 minutes
      > /usr/bin/git config --local --remove-section credential # timeout=10
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
      at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/:refs/remotes/origin/" returned status code 143:

      and the same fragment of log from 'multibranch pipeline':

      Started by user (...)
      Setting origin to https://github.com/(...)
      Fetching origin...
      > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
      Fetching upstream changes from https://github.com(...)
      > /usr/bin/git --version # timeout=10
      using .gitcredentials to set credentials
      > /usr/bin/git config --local credential.username oocpawel # timeout=10
      > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
      > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/:refs/remotes/origin/ --depth=1 # timeout=120

      the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min

          [JENKINS-36849] Github organization folder plugin fetch timeouts

          Pawel Mucha created issue -
          Pawel Mucha made changes -
          Description Original: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}


          New: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}




          Pawel Mucha made changes -
          Description Original: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}




          New: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.




          Pawel Mucha made changes -
          Summary Original: Github organization folder plugin is using only master node New: Github organization folder plugin fetch timeouts
          Pawel Mucha made changes -
          Description Original: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.




          New: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

           'github organization':

          Started by user (...)
          Connecting to https://api.github.com using (...)
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from 2 remote Git repositories
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com/(...).git
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username (...) # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*

          ERROR: Timeout after 10 minutes
           > /usr/bin/git config --local --remove-section credential # timeout=10
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*" returned status code 143:


          and the same fragment of log from 'multibranch pipeline':

          Started by user (...)
          Setting origin to https://github.com/(...)
          Fetching origin...
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com(...)
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username oocpawel # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=120
           > /usr/bin/git config --local --remove-section credential # timeout=10
           > /usr/bin/git rev-parse branches/JenkinsPipeline^{commit} # timeout=10
           > /usr/bin/git rev-parse refs/remotes/origin/branches/JenkinsPipeline^{commit} # timeout=10
          Checking out Revision 04471b0ad817b750d764234c09a11988895ba450 (refs/remotes/origin/branches/JenkinsPipeline)
           > /usr/bin/git config core.sparsecheckout # timeout=10
           > /usr/bin/git checkout -f 04471b0ad817b750d764234c09a11988895ba450
           > /usr/bin/git rev-list 6100c72f6f7a841d35432711602ecd11ab68bc7d # timeout=10


          the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min
          Pawel Mucha made changes -
          Description Original: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

           'github organization':

          Started by user (...)
          Connecting to https://api.github.com using (...)
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from 2 remote Git repositories
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com/(...).git
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username (...) # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*

          ERROR: Timeout after 10 minutes
           > /usr/bin/git config --local --remove-section credential # timeout=10
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*" returned status code 143:


          and the same fragment of log from 'multibranch pipeline':

          Started by user (...)
          Setting origin to https://github.com/(...)
          Fetching origin...
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com(...)
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username oocpawel # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=120
           > /usr/bin/git config --local --remove-section credential # timeout=10
           > /usr/bin/git rev-parse branches/JenkinsPipeline^{commit} # timeout=10
           > /usr/bin/git rev-parse refs/remotes/origin/branches/JenkinsPipeline^{commit} # timeout=10
          Checking out Revision 04471b0ad817b750d764234c09a11988895ba450 (refs/remotes/origin/branches/JenkinsPipeline)
           > /usr/bin/git config core.sparsecheckout # timeout=10
           > /usr/bin/git checkout -f 04471b0ad817b750d764234c09a11988895ba450
           > /usr/bin/git rev-list 6100c72f6f7a841d35432711602ecd11ab68bc7d # timeout=10


          the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min
          New: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

           'github organization':

          Started by user (...)
          Connecting to https://api.github.com using (...)
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from 2 remote Git repositories
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com/(...).git
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username (...) # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*

          ERROR: Timeout after 10 minutes
           > /usr/bin/git config --local --remove-section credential # timeout=10
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*" returned status code 143:


          and the same fragment of log from 'multibranch pipeline':

          Started by user (...)
          Setting origin to https://github.com/(...)
          Fetching origin...
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com(...)
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username oocpawel # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=120



          the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min
          Pawel Mucha made changes -
          Description Original: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

           'github organization':

          Started by user (...)
          Connecting to https://api.github.com using (...)
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from 2 remote Git repositories
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com/(...).git
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username (...) # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*

          ERROR: Timeout after 10 minutes
           > /usr/bin/git config --local --remove-section credential # timeout=10
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*" returned status code 143:


          and the same fragment of log from 'multibranch pipeline':

          Started by user (...)
          Setting origin to https://github.com/(...)
          Fetching origin...
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com(...)
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username oocpawel # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=120



          the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min
          New: I have Jenkinsfile with specific node allocation and git checkout on that node, but "github organization folder plugin" is starting build on master and checking out repository on master with default timeout values, before starting my Jenkinsfile script, so I am getting timeouts, because my repository is really big and 10min is simply too small.

          my Jenkinsfile looks like this:
          {code:java}
          node("*Not_master_node*")
          {
                checkout(
                       [$class: 'GitSCM',
          branches: [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions:
          [
          [$class: 'CleanBeforeCheckout'],
          [$class: 'CheckoutOption', timeout: 180],
          [$class: 'CloneOption',
          depth: 0,
          noTags: false,
          shallow: true,
          timeout: *180*
          ]
                                    ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: '...', url: 'https://github.com/...']]]
          )
          }
          {code}

          I found difference in output between 'github organization' and 'multibranch pipeline' project build output, and this is propably reason why I am getting timeouts in one and on the other one not.

           'github organization':

          Started by user (...)
          Connecting to https://api.github.com using (...)
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from 2 remote Git repositories
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com/(...).git
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username (...) # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*

          ERROR: Timeout after 10 minutes
           > /usr/bin/git config --local --remove-section credential # timeout=10
          ERROR: Error fetching remote repo 'origin'
          hudson.plugins.git.GitException: Failed to fetch from https://github.com/(...).git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
          at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85)
          at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/(...).git +refs/heads/*:refs/remotes/origin/*" returned status code 143:



          and the same fragment of log from 'multibranch pipeline':

          Started by user (...)
          Setting origin to https://github.com/(...)
          Fetching origin...
           > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repository
           > /usr/bin/git config remote.origin.url https://github.com/(...) # timeout=10
          Fetching upstream changes from https://github.com(...)
           > /usr/bin/git --version # timeout=10
          using .gitcredentials to set credentials
           > /usr/bin/git config --local credential.username oocpawel # timeout=10
           > /usr/bin/git config --local credential.helper store --file=/tmp/(...) # timeout=10
           > /usr/bin/git -c core.askpass=true fetch --tags --progress https://github.com/Calnex/CAT +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=120



          the difference is in fetch line, originally 'multibranch pipeline' has timeout 120min and 'github organization' is using default 10min
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173593 ] New: JNJira + In-Review [ 185220 ]
          Jesse Glick made changes -
          Link New: This issue duplicates JENKINS-37658 [ JENKINS-37658 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            kohsuke Kohsuke Kawaguchi
            b2yq Pawel Mucha
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: