Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


VSCode and Bitbucket authentication cannot be done while running remotely


I'm trying to enable the Jira and Bitbucket (Official) extension in Visual Studio Code, and I cannot get past the Authentication step.


  • Windows 10, 64 bit
  • VS Code v 1.54.3 (the latest)
  • Local PC connects to internet through a DSL router
  • PC connected to employer's network through VPN -- but problem persists when VPN is disconnected
  • Other installed extensions include:
    • Remote Development, Remote - WSL, Remote -SSH, Remote - Containers
    • C/C++, C#, Python, YAML

Following the instructions on the Get started with VS Code page, I'm at the "Authenticate with Bitbucket Cloud" step. ("Authenticate with Jira Cloud" looks the same. Right now I'm most interested in Bitbucket Cloud.)

With the Atlassian Settings tab open, I select BITBUCKET at the top, and then I open the Authentication bar. There's an Alert which says

Authentication cannot be done while running remotely
To authenticate with anew site open this (or another) workspace locally. Accounts added when running locally will be accessible during remote development.

The "Login to Bitbucket Cloud" link is greyed out and cannot be selected.

This is a new installation of VSCode on this PC; I haven't done much with it yet. What do I do next?


EDIT: I found a workaround. Now I want to know why the workaround works, and why I couldn't login from a remote workspace. I'll describe it in the first response to this question.

2 answers

Here's the workaround.

Since I'm running WSL, I created a directory /mnt/c/users/myname/source/repos/blah and in that directory I created a file blah.cpp - a simple "Hello world" dummy file.

Then I opened the Explorer view in VSCode. It said something like "You're running remotely" and offered an OPEN A WORKSPACE button.

I clicked on OPEN A WORKSPACE and in the sector window was another button saying Open Local. Clicking the Local button gave me the classic Windows File Selection dialog window. I navigated to C:\users\myname\source\repos\blah and selected that folder.

With that workspace open, I was able to go back to the Atlassian Settings tab and click the Login to Bitbucket Cloud link.

QUESTION FOR THE GURUS: Simply opening a folder or workspace in Windows land (the C:\ path) was enough to create a local connection. Since the /mnt/c path pointed to the same place as the C:\ path, why was connecting via the C:\ path necessary to enable Authentication?

WSL version: I'm running WSL 1 right now. Don't know whether that makes any difference.

I'm having the same problem with WSL2 and Coder Enterprise. This really needs fixed.

Like # people like this

Same problem here. Unable to connect to JIRA (Win 11 64bits, WSL2) Error message: Authentication cannot be done while running remotely.

Like Thomas.Meehan likes this

The login receiver runs as a local service. It cannot do this when you are running remotely via WSL - WSL is not local Windows.

Pretty simple logic. Pretty annoying implementation ;)

When opening any workspace locally, the local service can now run without interference and accept the returned auth details on localhost:<port>.

IMO, VSCode should be able to spin up a silent, empty, local workspace in the background and accept the auth response via that.

Or hell, let us copy/paste!

Like # people like this

As of 2022 and early 2023, this is still a problem


I wonder what we the community can do to gain more exposure on this issue

Agree, unable to connect to JIRA. Windows 11 64 bits, WSL2. Error message: Authentication cannot be done while running remotely.

Like Thomas.Meehan likes this

Pretty sure it is a VSCode limitation, not Atlassian's - they have to work within the framework that VSCode provides for them.

Seeing as how many extensions use this process for logging in, I would assume it's not Atlassian's fault.

Like # people like this

But why is the error message so bad? I had to come here and search to figure out what the problem was.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events