Git push operations extremely slow on Windows

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Push operations in Windows environments take above 20 seconds (minutes) to be completed:

1 2 3 4 5 6 7 8 [33391ms] - "POST /scm/TEST/foo.git/git-receive-pack HTTP/1.1" [203ms] - Bitbucket ServerUser com.atlassian.bitbucket.user.UserService.authenticate(String,String,CaptchaResponse) [0ms] - InternalBitbucket ServerUser com.atlassian.bitbucket.internal.user.Bitbucket ServerUserDao.findByName(String) [0ms] - void com.atlassian.bitbucket.internal.user.RepositoryAccessDao.trimToFirstPage(InternalBitbucket ServerUser,int,Predicate) [0ms] - boolean com.atlassian.bitbucket.user.PermissionService.hasRepositoryPermission(Bitbucket ServerUser,Repository,Permission) [0ms] - boolean com.atlassian.bitbucket.internal.user.GrantedPermissionDao.isGrantedToUser(UserPermissionSearchCriteria) [0ms] - boolean com.atlassian.bitbucket.user.PermissionService.hasRepositoryPermission(Bitbucket ServerUser,Repository,Permission) ...

Cause

Running Bitbucket Server as a user (either via Windows service or not) that is part of the Administrator group causes Windows to spend a lot of time running permission checks.

atlbitbucket

If you installed Bitbucket Server as a service using the installer as described on Getting started, you shouldn't be seeing this issue when it is run as a service. A user atlbitbucket is created and responsible for running Bitbucket Server. This user is not a member of the Administrator group. Please refer to Run the Bitbucket installer for more details on the atlbitbucket user.

Resolution

Resolution option 1 (recommended) - Reinstall Bitbucket Server as a local user

In order to change the Bitbucket Server user, the following procedure is the preferred option:

  • Stop the current Bitbucket Server instance

  • Install a new Bitbucket Server on the windows server by using the installer

    • Select a new installation directory

    • Select the existing home directory

  • Bitbucket Server is now up and running with the expected Windows user details

Resolution option 2 - Microsoft hotfix

If Bitbucket Server cannot be run as a non-administrator user, apply this hotfix http://support.microsoft.com/kb/2545833.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.