Skip to content

Jira and BitBucket extension doesn't work #1559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bhargavim613 opened this issue Apr 27, 2020 · 25 comments
Closed

Jira and BitBucket extension doesn't work #1559

bhargavim613 opened this issue Apr 27, 2020 · 25 comments
Labels
bug Something isn't working extension The issue needs to be fixed in the extension
Milestone

Comments

@bhargavim613
Copy link

Jira and BitBucket Official Extension , which is supported by Vscode version 1.40 and later isnt available , when using this Code server VScode. Please resolve this issue.

The following link is about the extension i was talking about

https://marketplace.visualstudio.com/items?itemName=Atlassian.atlascode

@cmoog
Copy link
Contributor

cmoog commented Apr 27, 2020

Thank you for bringing this to our attention. The extension is now live in our marketplace.

@cmoog cmoog closed this as completed Apr 27, 2020
@bhargavim613
Copy link
Author

which marketplace?? can u please share the url of the extension?

@nhooyr
Copy link
Contributor

nhooyr commented Apr 28, 2020

@cmoog See #1572

@nhooyr nhooyr changed the title Extension not available on VScode Jira and BitBucket extension doesn't work Apr 28, 2020
@bhargavim613

This comment has been minimized.

@bhargavim613

This comment has been minimized.

@cmoog
Copy link
Contributor

cmoog commented Apr 28, 2020

@bhargavim613 Updating your version of code-server will resolve the issue.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 28, 2020

@bhargavim613 Please stop spamming.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 30, 2020

@bhargavim613 Feel free to ping me here if this wasn't resolved by @cmoog's suggestion.

@wjziv
Copy link

wjziv commented May 5, 2020

Hey, I'm looking to confirm the validity in the Issue's title statement.

I'm having trouble with the Official Atlassian Jira extension, which shows the following upon starting set-up:

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

The phrasing of "open this workspace locally" threw me for a loop, as I'm already running code-server on my machine. Is set-up not possible within code-server?

@code-asher
Copy link
Member

Ah yeah code-server implements the remote portion of VS Code so it would be the same as if you installed VS Code remote and pointed it to your local machine. Unfortunately there's no detection mechanism in place for seeing if a remote instance is running local to the browser accessing it.

The best way around this would be if the extension supported a remote workflow but for now I think you'll have to authenticate once in local VS Code. :(

@andre-vspry
Copy link

andre-vspry commented Jun 26, 2020

I found you can click the login buttons on the onboarding page shown once on start. If you didn't do that you can bring it up again with a ctrl+shift+p and search for onboarding.

@phiiaz
Copy link

phiiaz commented Jun 26, 2020

I tried that. Still does not let me log in.

I also I notice the version on codeserver marketplace is behind.

@phiiaz
Copy link

phiiaz commented Jul 8, 2020

Contacted the Atlascode team (They are working on the Jira and Bitbucket plugin). They are working on the issue of supporting the VS cloudspace. here is the ticket to follow.

@dsehrawat
Copy link

The best way around this would be if the extension supported a remote workflow but for now I think you'll have to authenticate once in local VS Code. :(

Can someone please explain how to authenticate "once in local VS Code"?
I am running code-server in the cloud on a Ubuntu server (EC2 machine). Is there a way to authenticate VS Code (Atlassian VSCode extension) against Bitbucket? A command line option would be great if any.

@code-asher
Copy link
Member

One way is to launch VS Code locally, authenticate with the extension, then copy up the VS Code data directory to your remote server so code-server can use it. I haven't tested this myself but I think it should be as simple as copying the local ~/.vscode directory to the remote ~/.local/share/code-server directory although it's possible the authentication info is stored somewhere else.

I don't know if this extension handles authentication in the same way as the GitHub extension, but if it's similar then this comment might help to find an alternate workaround: #1883 (comment)

@dsehrawat
Copy link

Thanks for the quick reply.
I tried the first approach to authenticate the extension locally and then copying /.vscode/extensions directory to the remote location (/.local/share/code-share/extensions). But it did not work.

Doesn't it use 'keytar' to store auth token / passwords rather than some file?
Can we manually update this info in the keytar somehow?

@code-asher
Copy link
Member

Ahhhh yeah you're right, I checked the extension code and it seems they save the credentials using keytar.

I'm not sure if you can copy the keychain but one idea would be to manually get and save the credentials:

cd /path/to/code-server/lib/vscode
node -e 'require("keytar").findPassword("atlascode-authinfoV3") // run on the local machine
node -e 'require("keytar").setPassword("atlascode-authinfoV3", account, password) // run on the remote machine

But I'm not sure it'll work. On my remote machine keytar doesn't seem to work at all because of dbus issues.

@code-asher
Copy link
Member

Correction: it would be findCredentials, not findPassword. https://www.npmjs.com/package/keytar#findcredentialsservice

@dsehrawat
Copy link

dsehrawat commented Aug 13, 2020

That was smart thought.
But the problem is even if I could authenticate a bitbucket account on a local system (using vscode), it is still asking for authentication on running code-server on the same local system.

Although it shows the following on the UI:
"Authentication cannot be done while running remotely. To authenticate with a new site open this (or another) workspace locally. Accounts added when running locally will be accessible during remote development.".

I can see that the bitbucket account key has been deployed in "password and keys" with "service: atlascode-authinfoV3". But still the code-server can not access it or is not using it.

Not sure what else to try !!! Any suggestion?

@nhooyr
Copy link
Contributor

nhooyr commented Aug 17, 2020

Authentication cannot be done while running remotely.

Sounds like the extension does not allow you to use it while being accessed via a browser?

@blaylockbk
Copy link

@cmoog Would an updated extension help the Bitbucekt extension to work? My local vscode says the extension version is 2.8.5, but code-server has version v2.4.11-tlsh

VS Code
image

code-server
image

@code-asher
Copy link
Member

code-asher commented Nov 24, 2020 via email

@nhooyr nhooyr added bug Something isn't working extension The issue needs to be fixed in the extension labels Dec 8, 2020
@nimda95
Copy link

nimda95 commented Jan 15, 2021

So here is a simple trick you will change in the bitbucket extension code
P.S Tested on version extension 2.8.5, and working for now.

You go to ~/.local/share/code-server/extensions/atlassian.atlascode-VERSION.NUMBER/build/extension/extension.js and find the function named getIsRemote, you will change the condition there with false (I found the function to be declared twice).

Now reload your vs-code window (didn't have to restart the code-server server), voilà, you will have the button to athenticate now enabled.

Click on that auth button, follow the procedure as usual, and at the end you will come at a http://127.0.0.1:<int>/bbcloud?state=<string>&code=<string>, just copy-it and run-it using curl or whatever you like (e.g wget) in the vscode terminal (if you are running your instance locally, normally it should go ahead normally, but if it's in a container or cloud server as I have ... well, you know the rest of the story).

Congrats, It should be now authenticated.

Message to Atlassian : just please remove the remote verification from the code, we are dev, we'll know what we're dealing with.

@jsjoeio jsjoeio added this to the Backlog milestone Apr 29, 2021
@stale
Copy link

stale bot commented Oct 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Oct 26, 2021
@stale stale bot closed this as completed Nov 2, 2021
@MitchTalmadge
Copy link

MitchTalmadge commented Jun 15, 2022

Thank you @nimda95 for this trick. It worked perfectly.

Unfortunately there's still no indication from Atlassian of if/when they will fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension The issue needs to be fixed in the extension
Projects
None yet
Development

No branches or pull requests