Issue Key Check failing when committing

Jamie Young January 21, 2025

I have a script that, while performing a job on branch A, creates a branch from our master branch, makes some changes and then tries to add and commit those changes, before switching back to branch A.
The commit doesn’t work, and I get an issue key error, where there is no issue key error:
remote:
[Issue Key check]
21:54:16 remote: The branch name “feature/EAPPS-439-update-prepare_beta_build.sh-and-add-new-script-to-point-to-prod-cc-beta-build-Sports-cloud-config” does not contain a valid issue key
21:54:16 remote:
21:54:16 To ssh://bitbucket.kindredgroup.com:7999/eapps/kindrediosapps.git
21:54:16 ! [remote rejected] feature/EAPPS-439-update-prepare_beta_build.sh-and-add-new-script-to-point-to-prod-cc-beta-build-Sports-cloud-config → feature/EAPPS-439-update-prepare_beta_build.sh-and-add-new-script-to-point-to-prod-cc-beta-build-Sports-cloud-config (pre-receive hook declined)
21:54:16 error: failed to push some refs to ‘ssh://bitbucket.kindredgroup.com:7999/eapps/kindrediosapps.git’
21:54:16 % Total % Received % Xferd Average Speed Time Time Time Current
21:54:16 Dload Upload Total Spent Left Speed
21:54:16
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 847 0 0 100 847 0 4028 --:–:-- --:–:-- --:–:-- 4033
I don't have a detailed understanding of what BitBucket does in an Issue Key Check, as it is just one of a set of options ticked. However, both the branch and the commit message contain a valid issue key (EAPPS-439).
Could this be happening because I’m trying to commit in a script, or something related?

1 answer

0 votes
Sahir Maharaj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2025

Hello @Jamie Young

Based on my limited experience, the issue key validation might be failing due to a pre-receive hook misconfiguration in Bitbucket.

Ensure the branch and commit message include a valid issue key and match the required naming conventions.

Jamie Young January 22, 2025

Hi Sahir,

Thanks for answering. Branch and commit message both include a valid issue key. I'm curious to know the exact details of the pre-receive configuration, but don't know where to access them.

Jamie Young January 22, 2025

These are the settings:

BtBucket settings.png

Jamie Young January 24, 2025

Also, quite importantly, it works locally.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events