Issue
I'm configuring a Jenkins environment for my company. We use gitea (1.9.3), Jenkins 2.194 and git version 2.23 when i build a repository from source code management it builds the repository but it takes between 120-150 seconds to do a fetch command. any suggestions on what to do?
I tried to change git clients, make sure the credentials are ok, tried with empty or full repository and with sub modules and only one branch configuration.
the problematic part:
C:\Program Files\Git\cmd\git.exe fetch --no-tags --force --progress https://XXX:3000/Tests/test-repo.git +refs/heads/:refs/remotes/origin/ *
Edit 1: The build take 4:27 no matter if the repository is empty or full of stuff, the git fetch command takes around 3 seconds if i run it manually from the server.
Solution
I tried to install Jenkins on Ubuntu server 18.04 and it shorten the time from 4.5 minutes to around 20 seconds for a full build with sub modules.
Answered By - Barak Valzer