I'm creating pre-receive hook which needs to have access to environment variable created based on git push --push-option=variable command but all I'm getting is
fatal: the receiving end does not support push options
I've already changed my remote config and set advertisePushOptions to true and upgrade git version both on client and server side, but still issue remains.
Is it possible that Bitbucket doesn't support this git option?
Hi Kinga,
I've done some research and found something here that could be useful for you:
After searching through code until I found the actual tests for push options I found out you have to enable a specific config for the repository which is conveniently disabled by default: https://git-scm.com/docs/git-config#git-config-receiveadvertisePushOptions
You can enable it with
$ git config receive.advertisePushOptions true
If that desn't help you, can you let us know which Bitbucket Server version are you using? The pre-receive module hook has been deprecated in 5.0, you can read more about it at Pre-receive hook plugin module.
Our developer Community might also have good resources for you, you can visit it here.
Hope that helps!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.