How to configure global git config in Bitbucket Server
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
要約
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.
環境
Bitbucket Server/Data Center running on Linux/unix environment.
ソリューション
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.