Jira Hooks for Stash is blocking my tag's push

Paulo Sgarbi March 7, 2016

I'm trying to push a tag to a Bitbucket server with JIRA Hooks for Stash plugin, but Push check hook is blocking it with:

"remote: [Syntax check] There should be at least one change-set with a valid issue key"

But my tags usually doesn't have a valid issue key, they're just like:

git tag -a v1.4 -m "my version 1.4"

Is there a way to tell JIRA Hooks to ignore tags in the validation?

9 answers

1 vote
Benjamin Mueller August 25, 2017

Hello everybody,

the issue has been fixed in the latest version of the plugin.

 

Cheers Benjamin

Yogesh Mude
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.
February 18, 2019

HI @Benjamin Mueller 

We are using bitbucket v4.12.0 and Jira hooks for Bitbucket v3.1.4, still, we are facing this issue.

Could you please let us know the version to which this issue has been fixed so that we will make sure this plugin version should be compatible with bitbucket.

0 votes
Asha.Ahirwar May 3, 2017

Its Pre-recevie hook, if you have bitbucket admin access, go to the bitbucket repository setting -> Hook-> push check-> Enabled

Admin can manage this hook repository base.i am using this hook its good for traking purpose.

0 votes
Scott Lavender April 12, 2017

We are experienceing the same issue with this hook. I configured it and tested it in a test repo. It works for me without that Jira error. But, when others on my team attempt to push, they get the Jira issue.

 

remote: [Syntax check] Permission problems. You are not allowed to execute the requested JIRA Rest action. Please ensure that authentication method OAuth is enabled. Also the OAuth options "Allow 2-Legged OAuth" and "Allow user impersonation through 2-Legged OAuth" should be set on both sides of the application link (in- and outgoing connections) (CredentialsRequiredException: You do not have an authorized access token for the remote resource.)

Scott Lavender April 12, 2017

BTW: We are all admins in this project.

It is a new project with four repos. When the hook is enabled on any of the four, the error occurs for them, but not me.

 Atlassian Bitbucket v4.6.2

 Atlassian JIRA Project Management Software (v7.3.3#73014-sha1:d5be8da) 

0 votes
Madhur November 15, 2016

Benjamin,

We are also facing the same issue. I am not even able to enable the hook the "Push Check" add-on and get the following error:

Permission problems. You are not allowed to execute the requested JIRA Rest action. Please ensure that authentication method OAuth is enabled. Also the OAuth options "Allow 2-Legged OAuth" and "Allow user impersonation through 2-Legged OAuth" should be set on both sides of the application link (in- and outgoing connections) (CredentialsRequiredException: You do not have an authorized access token for the remote resource.)

Bitbucket v4.10.1

JIRA v7.2.0

I have tried re-creating the links, I am admin on both the applications. 

One observation is that the option to choose Allow 2-Legged OAuth" and "Allow user impersonation through 2-Legged OAuth" for incoming and outgoing connections is no longer available on both Bitbucket and JIRA in their current versions. 

Can you check?

Benjamin Mueller August 25, 2017

Hi this message points out that the application link is not configured as 2 Legged OAuth. Also maybe the impersonation is not enabled. Please check this in both directions.

I this will not work, please raise a request in the service desk linked in the marketplace listing 

0 votes
Andrew Simpson November 4, 2016

I just wanted to chime in that we have also been seeing this with the latest JIRA hooks for stash plugin (3.0?).  We are seeing it with tags and with branch creation/deletion, which don't get commit messages.

NOTE:  i'm not the admin, and cannot tell for certain which version of hooks, but from the documentation, it appears to be the latest 3.0 version.

Bitbucket v4.10.0

JIRA (v7.2.2#72004-sha1:9d51328)

0 votes
ChandraG October 4, 2016

Benjamin,

We are also facing issue with below error, using Bitbucket 4.9.1 & JIRA 6.4.12.

remote: [Syntax check] Permission problems. You are not allowed to execute the requested JIRA Rest action. Please ensure that authentication method OAuth is enabled. Also the OAuth options "Allow 2-Legged OAuth" and "Allow user impersonation through 2-Legged OAuth" should be set on both sides of the application link (in- and outgoing connections) (CredentialsRequiredException: You do not have an authorized access token for the remote resource.)

OR

remote: [Syntax check] There should be at least one change-set with a valid issue key

while application is setup correctly & i am an admin for both the instances. Even if i disable the plugin & commit the file with valid issue id then i am able to see linking under commit on UI & navigate the issue from that link.

Benjamin Mueller August 25, 2017

Hi the first message points out that the application link is not configured as 2 Legged OAuth. Also maybe the impersonation is not enabled. Please check this in both directions. The second point should be fixed in the latest release.


If you have still problems, please raise a request in the service desk linked in the marketplace listing

0 votes
Jeff Turner July 5, 2016

Happens for me too, with Hooks 3.0.0 + Bitbucket 4.7.1. 

The repository is configured with a Push check, with checkbox Issue-key check ticked. When trying to push a branch:

git clone ssh://git@example.com:7999/tst/testrepo.git
cd testrepo
git branch testbranch
git checkout testbranch
git push --set-upstream origin testbranch

I get:

Total 0 (delta 0), reused 0 (delta 0)
remote: [Syntax check] There should be at least one change-set with a valid issue key
To ssh://git@example.com:7999/tst/testrepo.git
 ! [remote rejected] testbranch -> testbranch (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@example.com:7999/tst/testrepo.git'
Benjamin Mueller July 30, 2016

Hi Jeff,

 

was this the first time you have pushed something? with enabled hook? Because in that case the history of the branch (each commit) will be scanned. Also if the branch has no additional commit. The reason is, that each commit needs to be indexed by indexer of the hook. If you push the first time, the indexer has not build up the index and each commit will be scanned. 

Try to push the branch as user which has "Exception rights" (e.g. with a user, which is in a special group)

 

Cheers Benjamin

Kailas September 8, 2017

Hi Benjin,

We are also facing the same issue, is there any other way to do the first checkin with correct JIRA Issue while keeping "Puch Check " plugin enabled and without "Exception rights".

Regards

Kailas 

Benjamin Mueller September 8, 2017

Hi Kailas,

please use the latest version. The issue is already fixed in the version 3.0.2.

For Bitbucket 4.x users i have backported some bug fixes in the version 3.0.0.1.

if you have still problems, please contact our support channel

https://tracker-develop-and-consult.atlassian.net/servicedesk/customer/portal/4

Thank you in advance

Benjamin

0 votes
Dale Miller June 21, 2016

Benjamin we are also seeing this using JIRA 6.4.13 and Stash 4.3.0. Can you help us debug why this is happening?

0 votes
Benjamin Mueller May 5, 2016

Hi Paolo,

 

can you send me the version of JIRA and Stash/Bitbucket you use?

 

Thanks & Cheers

Benjamin

Dale Miller June 10, 2016

We are seeing this on JIRA 6.4.13 and stash 4.3.0 . Any ideas?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events