-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The git config -l
command stopped working after upgrading to Bitbucket 8
#138
Comments
As a workaround, I'm setting the
|
The workaround works in the pre-receive hook. But the post-receive hook runs without any |
I came up with the simplest set up I can think of that should allow one to reproduce the problem using the latest atlassian/bitbucket Docker image, which is tagged 8.13 today. Just to make sure that the problem had nothing to do with my particular environment, I created a new container like this:
Then, I installed the External Hooks plugin, created a new repository, enabled the plugin in it and installed a hook like this:
Then, I git-cloned the repository, created a commit and tried to git-push it. This is the result:
Notice how the command
|
I was able to infer the path to the repository using the environment variables
This way I can always set the This seems to be a general workaround, so far. |
I'm using External Hooks version 13.1.1 on Bitbucket Data Center, running in a container based on the
atlassian/bitbucket:7.21.4
Docker image.I upgraded Bitbucket, recreating the container based on the
atlassian/bitbucket:8.9.4
image. After the upgrade, my external hooks stopped working.I investigated and noticed that the external hook scripts are being invoked in an environment in which the command
git config -l
does not find the repository's configuration.I made the hook script output its environment variables and current directory both before the upgrade and after it.
Before the upgrade, the hook script is invoked in the
/var/atlassian/application-data/bitbucket/shared/data/repositories/2295
directory with the following environment variables (I replaced some sensitive parts withxxxxxxxx
):After the upgrade, the
pre-receive
script is invoked in the/var/atlassian/application-data/bitbucket/mesh/tmp/script-sandbox7711861015479551760
directory with the following environment variables:The command
git config -l
invoked by the external hook script returns just three lines:Since the script is being invoked from a different directory, perhaps the
GIT_OBJECT_DIRECTORY
is missing.I read the documentation but couldn't find anything related to this problem.
Can you help me figure this out?
Thanks!
The text was updated successfully, but these errors were encountered: