Note: This bug is fixed in Bitbucket Server 4.13 but third-party plugins (particularly plugins that check new commits as they are pushed) may also be impacted by the changes in git 2.11.
Summary
When the "Reject Force Push" hook is enabled and the Git version is 2.11.0, all pushes to the repository fail even when the --force option is not used.
Steps to reproduce
- Spin up Bitbucket Server using git v2.11.0
- Create a new repository and push an initial commit to it
- Turn the "Reject Force Push" pre-receive hook on OR setup branch permissions to prevent writing history on your branch
- Create a new commit and attempt to push it to Bitbucket Server
Expected Results
Push is successful.
Actual Results
Push is blocked by a pre-receive hook (or branch permissions).
Cause
From the git 2.11 release notes:
In order for the receiving end of "git push" to inspect the
received history and decide to reject the push, the objects sent
from the sending end need to be made available to the hook and
the mechanism for the connectivity check, and this was done
traditionally by storing the objects in the receiving repository
and letting "git gc" expire them. Instead, store the newly
received objects in a temporary area, and make them available by
reusing the alternate object store mechanism to them only while we
decide if we accept the check, and once we decide, either migrate
them to the repository or purge them immediately.
Workaround
Downgrade to Git 2.10.x or older. Any version after Git 2.11.0 (including future 2.12+ releases) cannot be used with Bitbucket Server.
Bitbucket Server 4.12 will fail on startup if Git 2.11+ is detected. However, older versions of Bitbucket Server (and Stash) are not aware of the 2.11 issues (since it was released after they were), but will still be broken by them. Administrators are strongly encouraged to only upgrade to Git versions which are explicitly marked supported on our Supported Platforms for the version of the product they're running.
- causes
-
BSERV-9764 CommitService.getCommit() can't find some commits with Git 2.11+ installed
- Closed
- mentioned in
-
Page No Confluence page found with the given URL.
-
Page No Confluence page found with the given URL.
-
Page No Confluence page found with the given URL.
-
Page No Confluence page found with the given URL.
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- Wiki Page
-
Wiki Page Loading...
Pre-receive hooks and branch permissions reject valid pushes on git 2.11
Note: This bug is fixed in Bitbucket Server 4.13 but third-party plugins (particularly plugins that check new commits as they are pushed) may also be impacted by the changes in git 2.11.
Summary
When the "Reject Force Push" hook is enabled and the Git version is 2.11.0, all pushes to the repository fail even when the --force option is not used.
Steps to reproduce
- Spin up Bitbucket Server using git v2.11.0
- Create a new repository and push an initial commit to it
- Turn the "Reject Force Push" pre-receive hook on OR setup branch permissions to prevent writing history on your branch
- Create a new commit and attempt to push it to Bitbucket Server
Expected Results
Push is successful.
Actual Results
Push is blocked by a pre-receive hook (or branch permissions).
Cause
From the git 2.11 release notes:
In order for the receiving end of "git push" to inspect the
received history and decide to reject the push, the objects sent
from the sending end need to be made available to the hook and
the mechanism for the connectivity check, and this was done
traditionally by storing the objects in the receiving repository
and letting "git gc" expire them. Instead, store the newly
received objects in a temporary area, and make them available by
reusing the alternate object store mechanism to them only while we
decide if we accept the check, and once we decide, either migrate
them to the repository or purge them immediately.
Workaround
Downgrade to Git 2.10.x or older. Any version after Git 2.11.0 (including future 2.12+ releases) cannot be used with Bitbucket Server.
Bitbucket Server 4.12 will fail on startup if Git 2.11+ is detected. However, older versions of Bitbucket Server (and Stash) are not aware of the 2.11 issues (since it was released after they were), but will still be broken by them. Administrators are strongly encouraged to only upgrade to Git versions which are explicitly marked supported on our Supported Platforms for the version of the product they're running.
- causes
-
BSERV-9764 CommitService.getCommit() can't find some commits with Git 2.11+ installed
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- Wiki Page
-
Wiki Page Loading...