(local) Forge login via CLI exception: ensure you have libsecret installed - latest libsecret-1-0 present

Hi folks,

On W11 Pro via WSL Ubuntu 22.04 I’m trying to get started with the “Getting started” guide. Part of that is doing a forge login on the local machine.

I’ve been trying to fix / debug what the actual problem here seems to be, but have hit the roadblock of not figuring it out.

The problem:

Looking around for libsecret, I found the package: libsecret package : Ubuntu (launchpad.net). Attemping to install it I get that I already have the latest installed.

I also found this thread “How to use Forge CLI in a CI environment? - Forge / Forge Platform and Tools - The Atlassian Developer Community”, mentioning to use environment variables. So, created those (FORGE_EMAIL and FORGE_API_TOKEN), both values set to what they should be, and tried again with same results.

That last thread mentions to just continue on without doing the forge login and that it works fine for them. As I’m starting out looking into developing something here, I think it would be in my best interest to have all the tooling working as intended.

As a last option I also followed an article to install the dev package of libsecret and build it. However, this also did not work for me. (sorry, no link, new account)

Any ideas?

1 Like

Try uninstalling Forge CLI and then reinstalling it with --no-optional on the npm install command.

Hi @danielwester,

Thanks for the quick reply! I tried your suggestion just now, didn’t work. Attempting the login gets the same result.

Interestingly, they key does show up in my Atlassian Account as having been used. That confirms that the login part at least is working and the problem is fully local.

If you have any other suggestions, I’m very much open to them!

Thanks again,
Robin

Hello,

Since you’re running WSL and not the full Ubuntu distribution, I believe the service responsible for secret storage (gnome-keyring-daemon or similar) isn’t running inside the Linux environment, and therefore Forge can’t store your token securely (it can’t use Windows’ secure storage from inside WSL either).

Sorry for the confusing message, we will investigate how to provide better diagnostics and store the token securely under WSL.

In meanwhile you can:

2 Likes

Hi, any updates on the issue yet? i have the same problem.

I got this working by installing some apt packages to get gnome keyring working. Can’t tell you exactly what I installed off the top of my head but next time I reset my environment I will let you know.

The gnome keyring actually works fine in WSL2 with the new X11 forwarding

Hi,
Using WSL2 with Windows 11, I have installed gnome-keyring package. I have also installed NVIDIA CUDA Support for WSL2 but I don’t think it is necessary. After that, I have restarted WSL (wsl --shutdown and later wsl) to get it working.

2 Likes