How to configure global git config in Bitbucket Server

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

Summary

There will be some instances where you would want to configure some git parameters to all the repositories in the Bitbucket server. This article explains how you can configure such global git config settings.

Environment

Bitbucket Server/Data Center running on Linux/unix environment.

Solution

If you want to set the parameters for all the repositories you can either use the --global parameter or the --system parameter. Since you may be using a different user to login to the server and a different user to start Bitbucket, we suggest you use the --system parameter.

This will write to system-wide $(prefix)/etc/gitconfig rather than the repository .git/config.

For example, if you would like to set the configurations for the parameters like pack.windowmemory, pack.packsizelimit and pack.threads globally, you can use the below commands.


sudo git config --system pack.threads "1"
sudo git config --system pack.packSizeLimit "100m"
sudo git config --system pack.windowMemory "100m"

If you need any more clarifications on this, please reach out to Atlassian support.

Last modified on May 16, 2022

Was this helpful?

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