Getting "RECV=oauth_problem=token_rejected" on git push

Issue #84 closed
Former user created an issue

Jira version: 7.7.0 Bitbucket version: 6.3.1 (also tried with 6.3.0) Control Freak version: 2019.04.12

I upgrade Bitbucket from 5.12.0 and all add-ons to the latest version and when I try to push I'm getting the following error:

11:08 $ GIT_TRACE=2 git push trace: built-in: git 'push' trace: run_command: 'ssh' '-p' '7999' 'git@rnd-testbitbucket.intelerad.com' 'git-receive-pack '\''/bc/ahtest.git'\''' trace: run_command: 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress' trace: exec: 'git' 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress' trace: built-in: git 'pack-objects' '--all-progress-implied' '--revs' '--stdout' '--thin' '--delta-base-offset' '--progress' Counting objects: 5, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 307 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) remote: Control Freak: at com.bitbooster.hook.JiraUtil.query(JiraUtil.java:109) remote: Control Freak - pre-receive failed: java.lang.RuntimeException: Bad JIRA HTTP POST=401 SENT={"fields":["status","assignee"],"validateQuery":false,"jql":"KEY IN(BC-4511)"} RECV=oauth_problem=token_rejected remote: at com.bitbooster.hook.JiraUtil.query(JiraUtil.java:109) remote: at com.bitbooster.hook.JiraUtil.query(JiraUtil.java:67) remote: at com.bitbooster.hook.MyMergeCheckHook.jiraPolicyCheck(MyMergeCheckHook.java:1124) remote: at com.bitbooster.hook.MyMergeCheckHook.validateChange(MyMergeCheckHook.java:608) remote: at com.bitbooster.hook.MyMergeCheckHook.processReceive(MyMergeCheckHook.java:369) remote: at com.bitbooster.hook.ControlFreakPreReceive.preUpdate(ControlFreakPreReceive.java:114) remote: To ssh://git@rnd-testbitbucket.intelerad.com:7999/bc/ahtest.git ! [remote rejected] BC-4511-test-test-test -> BC-4511-test-test-test (pre-receive hook declined) error: failed to push some refs to 'ssh://git@rnd-testbitbucket.intelerad.com:7999/bc/ahtest.git'

If I disable the following Control Freak option, my push is working: Match JQL: sprint not in futureSprints() AND sprint in openSprints()

Let me know if you need more information.

Thanks, Alain

Comments (2)

  1. JIRA Admin

    I found the problem. You can close this issue.

    2 possibilities:

    1. Just my personal OAuth key in Bitbucket to talk to Jira that was invalid after the upgrade for an unknown reason
    2. The Application link between Bitbucket and Jira become invalid after the upgrade. And by re-creating the app-link I had to revoke my personal OAuth key and re-create it by clicking to the link displayed by the “git push” command.
  2. Julius Davies [bit-booster.com] repo owner

    Thanks for the bug report! I think a number of people are running into this - we're going to try and improve our error messages for all of the 4xx and 5xx responses we get from Jira when oauth goes sideways.

  3. Log in to comment