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

I am running Jenkins on windows and when I am trying to build my project through jenkins, ERROR: Error cloning remote repo ‘origin’
Finished: FAILURE

  1. I added the public key as well. increased - Advanced clone behaviours timeout.
  2. i added user credentials
  3. I did the same setup on macOS, and it’s working fine. However, I’m facing problems on Windows. I’m able to fetch the source code on my local machine.

If the command timed out in 10 minutes, then the timeout was probably not applied. Double check that you didn’t set the checkout time. Double check that you set it to more than the default of 10 minutes

Windows file systems are slower than Unix file systems in general. Windows operations with git are generally slower than git operations on Unix file systems. That may also increase clone time.

Be sure that you’re running the most recent version of command line git. Newer command line versions are faster than older versions.

1 Like

Git on Windows can be a PITA. If you can Remote Desktop to that instance I would try to get git to work without jenkins to see if you have any other problems.

If you are using GitHub I recommend that you use API tokens instead of ssh keys, especially for Jenkins you would want to use a GitHub application as it will have much better integration than what can be done with just SSH access.

1 Like

Hi,

  1. When I add the API token, an error message stating “Authentication failure” appears.
  2. I’m encountering an RSA Host key error after adding an RSA key to my stash account and Jenkins credentials. I have already deleted the older RSA Host key from my local system and added a new one and downloaded code in Local system, but the error persists in Jenkins.

The RSA host key message indicates that Jenkins is configured to check the host key of the remote Git server but Jenkins does have a host key configured for that git server. Alternatives for configuring host key management are described in the git client plugin documentation.

So long as you are running on an operating system that is supported by Jenkins, then “accept first connection” is a very good choice and will avoid this type of failure message.

If the ssh version on your operating system is so old (and unsupported) that it does not allow “accept first versions”, then you’ll need to choose one of the other options.

1 Like

Hi MarkEWaite,

  1. In Manage Jenkins → Security, if I select “Known Hosts File,” I still get an error. Later, I changed to “Manually Provided Key” and entered the RSA key. Finally, the error was solved.

solution: manage_jenkins->security->Git Host Key Verification Configuration → Host Key Verification Strategy – manually provided key – Enter rsa key

  1. newly created credentials not listing credentials dropdown

    After selecting run as who triggered build, i am able to see the newly created credentials.

solution: manage_jenkins->security->Access Control for Builds → Run as who triggered build**