(401)Unauthorized error when trying to perform a smart commit referencing a JIRA issue

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

The following appears in the atlassian-fisheye.log:

1 2 2014-05-29 14:06:42,112 WARN [CommitNotifier1 ] com.atlassian.fecru.plugin.comithook.internal.DefaultCommitHookManager DefaultCommitHookManager-collateErrors - Error while processing a commit directive handled by plugin com.atlassian.fecru.plugin.commithook.fecru-jiracommithook-plugin:jiracommithook for changeset 67fb441d 32cd6df04bf432e4ef5b7b0cdbf445619 in repository <repository_name>: FishEye was unable to comment on the issue http://localhost:8080/browse/AAA-1 due do the following unexpected error: (401)Unauthorized

Cause

The Application Link between JIRA and Fisheye is configured as OAuth, and there is no token created in Fisheye/JIRA for the commiting user.

Resolution

The token needs to be created. You can do it by the following instructions:

  1. Create a test review in Fisheye.

  2. Log in with the commiting user.

  3. Open the review and click in "Edit Details".

  4. Fill the field "Linked Issue" with the key of some JIRA issue and click in "Link". You'll be prompted to authenticate.

  5. Do this for every commiting user (no need to create a new review, only link the review to any JIRA issue).

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.