Git clone is taking a long time to complete

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When running a git clone, it takes a long time to complete even if the repository is small.

There aren't errors in the application logs. In profiling logs, it shows that authentication takes a long time to complete:

2018-05-25 13:40:10,086 | http-nio-80-exec-7 | @5IZFEEx801x2949x0 | rmadalozzo | -
[86782ms] - "GET /scm/tes/repotest.git/info/refs HTTP/1.1"
[86751ms] - Authentication org.springframework.security.authentication.AuthenticationProvider.authenticate(Authentication)
[86735ms] - attemptAuthentication - com.atlassian.bitbucket.server.bitbucket-authentication:crowdHttpAuthHandler
[86735ms] - AuthenticationResult com.atlassian.stash.internal.user.CaptchaService.authenticateWithCaptcha(CaptchaTicket,UncheckedOperation)
[16ms] - Page com.atlassian.bitbucket.user.UserService.findGroupsByUser(String,PageRequest)
[31ms] - void com.atlassian.stash.internal.scm.git.protocol.http.HttpRefAdvertisement.handleRequest()
[31ms] - C:\Program Files\Git\cmd\git.exe upload-pack --advertise-refs --stateless-rpc E:\Atlassian\ApplicationData\Stash\shared\data\repositories\25

Cause

Check for the Follow referrals attribute in LDAP settings.

Resolution

Check to see from the LDAP settings if follow referrals attribute are enabled.

If it is, uncheck the Follow referrals LDAP attribute by going to Administration → User Directories → Edit → Advanced Settings → Follow Referrals.

Last modified on Oct 25, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.