On building jenkins project timeout after 10 minute error happens

前端 未结 3 1876
日久生厌
日久生厌 2021-02-02 05:21

I am using jenkins to build my git remote project. The problem is log says \'timeout after 10 min\'. Receiving object starts and at 56% something happens.

相关标签:
3条回答
  • 2021-02-02 06:09

    As @edison-medina mentions, increasing the timeout may help but in my case the shallow clone was a better option. The shallow clone will dramatically reduce the time needed to clone a repo, specially one that has been growing for some time and may have hundreds or thousands of commits per file, because you'll only fetch the file version history indicated by the "depth" parameter on the clone command. For most CI use-cases, using "1" is the best option since only the latest version of a file is needed to complete a build.

    To set this up in Jenkins, you'll need to open your project's configuration screen and find the section on Git, click the "Add" button under "Additional Behaviors", and select "Advanced clone behaviors". Check the "Shallow clone" option and set the depth to "1".

    You'll need to do this for each project in Jenkins. I haven't seen a way to do this globally for all projects.

    0 讨论(0)
  • 2021-02-02 06:15

    I have also face the same error while click on Build Now Button in Jenkins.

    Why this error comes ? Ans: This error was coming because of low Internet connection or may be the size of you project in github is large, so jenkins not able load/cone that project from git server.

    Solution steps:

    1. To resolve the problem we have to edit in Jenkins project configuration and find the git.
    2. Then click on Add button and select Advanced clone behaviors.
    3. Timeout (in minutes) for clone and fetch operations box put any number which is more then 10, (I put 60 here).
    4. Apply and the save the configuration.
    5. Build Now again , It took some more time to build , but it fixed the error.

    Cheers :)

    0 讨论(0)
  • 2021-02-02 06:17

    Edit your job configuration, and under git plugin section:

    • Click "Add"
    • Click "Advanced clone behaviours"
    • Set the number of minutes you want in "Timeout (in minutes) for clone and fetch operation"

    I recommend checking also the "shallow clone" option. It fetches only the last state of the repository (without the history), so it's much faster.

    0 讨论(0)
提交回复
热议问题