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.
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_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)
Try uninstalling Forge CLI and then reinstalling it with --no-optional on the npm install command.
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!
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:
- Use the environment variables and skip
forge login. Make sure the script setting them up - or your shell history - is secured!
- Install and use Forge under Windows directly if you are comfortable in that environment.
At your own risk, use one of the following solutions to run a keyring daemon inside WSL: