-
Bug
-
Resolution: Obsolete
-
High
-
None
-
8.9.14, 8.19.3
-
3
-
Severity 3 - Minor
-
8
-
-
RtB - Service ops & Tech entropy
Issue Summary
Git has recently released a clone protection feature which is designed to enhance security by preventing git clones if an active core.hooksPath configuration is found in the local repository. This inadvertently blocks the git clone command used by Bitbucket for internal processes such as the forking of repositories. The following Git versions are affected.
v2.45.1 v2.44.1 v2.43.4 v2.42.2 v2.41.1 v2.40.2 v2.39.4
Steps to Reproduce
- Install an affected version of Git that is in Bitbucket DC's supported range.
- Attempt to fork an existing repository in Bitbucket.
Expected Results
The fork should be successfully created.
Actual Results
The fork can't be created with an error similar to the following displayed.
'git clone --bare --shared --template=/var/atlassian/application-data/bitbucket/shared/config/git/templates /var/atlassian/application-data/bitbucket/shared/data/repositories/1 /var/atlassian/application-data/bitbucket/shared/data/repositories/2' exited with code 128 saying: Cloning into bare repository '/var/atlassian/application-data/bitbucket/shared/data/repositories/2'... fatal: active `core.hooksPath` found in the local repository config: ../../../config/git/hooks For security reasons, this is disallowed by default. If this is intentional and the hook should actually be run, please run the command again with `GIT_CLONE_PROTECTION_ACTIVE=false`
Workaround
Preferred
Upgrade to one of the following Git versions which reverted these changes: v2.39.5, v2.40.3, v2.41.2, v2.42.3, v2.43.5, v2.44.2, v2.45.2
NOTE: (We don't recommend Git 2.43.x, 2.44.x, and 2.45.x due to a possible performance regression.)
Please make sure the Git versions you use are listed on the Supported Platforms page
Alternative (if you cannot upgrade the Git version)
If users have installed one of the affected Git versions mentioned above, and that version of Git is within the version range supported by Bitbucket DC, the Git clone protection feature can be bypassed by setting the GIT_CLONE_PROTECTION_ACTIVE=false environment variable.
- is related to
-
BSERV-19463 Forking failures in Bitbucket DC docker containers due to new git clone protection feature
-
- Closed
-
- mentioned in
-
Page Loading...