How to avoid CAPTCHA when using Jira CLI

Problem Statement

This article describes how to avoid CAPTCHA when using a Jira CLI command and the Maximum Authentication Attempts Allowed option is set to 3 or less.

Background

When we set Maximum Authentication Attempts Allowed to 3 as shown in below screenshot, we are instructing Jira to allow the user to login for 3 times before the CAPTCHA is generated. 

When the password is incorrectly provided in all the attempts, the user statistics show as follows:

Environment

ApplicationJIRA 
VersionServer 
App VersionBelow 8.6.0

Error Message

The following log message is displayed on the console:

Remote error: User 'test' is not allowed to log in at this point in time perhaps due to CAPTCHA requirements.


In the case of Jira CLI, it retries the login attempt thrice by default. When the password is incorrectly provided, these three attempts by CLI are considered as the maximum authentication attempts allowed, leading to a CAPTCHA.

Solution

 The solution lies in having the Jira CLI to try the login only once in the background. To do this perform the following:

  1. Upgrade to 8.6.0 or the latest version of CLI from this link in case you are using a lower version.
  2. Use the option --options noCommRetry on the action to avoid the retry attempts from Jira CLI. This option allows CLI to check for the authentication only once.
--action createIssue --project TEST --options noCommRetry

It is always recommended to use the latest ACLI Release Notes.