Jira & Bitbucket extension for VS Code doesn't remember authentication credentials

Issue #349 new
Greg Ferrari created an issue

I use Visual Studio Code (VS Code) as an editor for writing software on Widows and linux.  Atlassian has a free extension for VS Code that allows you to connect to and interact with Jira and Bitbucket.  I have installed this extension,entered the URLs of my Jira and Bitbucket data center instances as “custom sites” (vs. Jira and Bitbucket Cloud), and entered my username/password credentials for those instances.  VS Code successfully connects to both Jira and Bitbucket; I can see Jira issues, Bitbucket pull requests, etc.

Here’s the problem, when I close VS Code and reopen it, VS Code no longer connects to Jira or Bitbucket.  If I click on the “Sign in to Jira/Bitbucket” buttons on the status bar, it simply drops me on the settings page that allows me to add a custom URL.  It isn’t using the credentials I entered when I first added the URL, and there is no way that I have found to get it to prompt me for credentials again.  I can see the URL I entered originally, but there’s no option to initiate a manual connection or re-enter my credentials.  I am forced to delete the URL I entered the first time, and add it all over again.

I would like the Atlassian extension for VS Code to automatically connect to Jira/Bitbucket when I open VS Code, or at least prompt me for just my password instead of making me completely reconfigure the connections.

I'm using "Jira and Bitbucket (Official)" extension version 2.3.1 and VS Code version 1.41.1 on Red Hat Enterprise Linux 7.

On Windows 10, the Bitbucket side of things in the extension seems to work.  On the Jira side, the extension connects but never shows any results where I should see Jira issues listed.

Comments (4)

  1. Jonathan Doklovic Account Deactivated

    Hi Greg. Sorry to hear your having issues.

    We use the local machine’s keychain to store credentials, so on the RedHat machine it may be as simple as the extension not being able to write to the key chain.

    You can verify this by authenticating with the extension and then opening up your keychain manager. It should have entries for:

    atlascode-authinfoV2/bitbucket and atlascode-authinfoV2/jira respectively.

    On the windows machine, can you double check that there is at least one JQL or filter setup on the Atlassian settings page under “Jira Issues Explorer”.

    If there are, then you can do the following to get some more debug output:

    1. use the command palette to open “Preferences: Open Settings (UI)”
    2. in the search box, type: “output level”
    3. You should see a result for “Atlascode: output level”. Set that to “debug”
    4. In the same search box, clear the search and type “curl”
    5. Find the check box for “Atlascode: enable curl logging”
    6. Open the bottom pane in VS Code and go to the “OUTPUT” tab
    7. In the right side select box choose “Atlassian”

    With all of the, you’ll now see debug logs, errors in the output pane. You’ll also see every request the extension makes as a curl command you can copy/paste into any terminal to test the results.

    Can you please let me know if you get any errors or something that doesn’t look right?

    Thanks!

  2. Greg Ferrari reporter

    I gave this another quick try on my Linux machine. At first, my key ring (Seahorse) was not setup properly. I have now corrected that issue, but the plugin still seems to have problems even though I can see the atlascode entries indicated by Jonathan.

    My default key ring does not unlock automatically when I log in due to security restrictions put in place by my IT department. Most applications that need credentials from my key ring cause Seahorse to prompt me for my default key ring password to unlock it. From then on, until I log out and back in again, the key ring is unlocked and I no longer get prompted for passwords.

    The Jira and Bitbucket plugin does not have this behavior, forcing me to manually unlock my keyring prior to opening VS Code. This is where things get a little weird, and seem to point to problems elsewhere.

    When I use Gnome, the plugin automatically signs in to Jira and Bitbucket as long as I unlock my keyring prior to opening VS Code. When I use KDE, the plugin does not automatically sign in to Jira or Bitbucket even if the keyring is unlocked prior. The only way I’ve been able to get the plugin to sign in to Jira and Bitbucket when using KDE is to delete and recreate the URL. The root cause is still a mystery.

    I have not yet had a chance to play with the Windows side and turn on debug logging.

  3. James E. Hunt [ASRC Federal]

    Might might be related, we are seeing 401 errors when the extension tries to refresh the Jira Issues filter trees. We are on prem Jira Data Center with Crowd SSO for authentication.

  4. Log in to comment