Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to forge login in the vm but i am getting some errors

Shubham Sharma January 16, 2025

 

(node:3088352) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. (Use `node --trace-warnings ...` to show where the warning was created) ✕ Logging you in... Error: The CLI couldn't securely store your login credentials in a local keychain. Ensure you have libsecret installed. If a local keychain is not available, use environment variables before trying again. See https://go.atlassian.com/dac/platform/forge/getting-started/#log-in-with-an-atlassian-api-token for more.

I am getting these error also I installed libsecret in my system but giving the same error and also I tried 2 different approaches i.e. 1) save cred in env variable and 2) passing cred as an command line argument but nothing works.....

and also i tried as an root user and with root user both are giving same error{A3E657D0-D5A7-4D0B-92E2-985AF5A48734}.png

2 answers

1 vote
Shafeeq January 17, 2025

Hi @Shubham Sharma

In Linux, the regular login method needs libsecret to work, here is a workaround

Store Email and API Token as Environment Variables

  1. Open your terminal.

  2. Run the following commands:

    read FORGE_EMAIL
    • After running this command, enter your email address and press Enter.
    read -s FORGE_API_TOKEN
    • After running this command, enter your API token. (Don't worry: It will not be visible as you type)
    export FORGE_EMAIL FORGE_API_TOKEN

Explanation 😉:

  • By exporting the email & API token as environment variables, the Forge CLI bypasses the need to use a local keychain for storing credentials

You can find more details about using environment variables to login in Forger here: https://developer.atlassian.com/platform/forge/getting-started/#log-in-with-an-atlassian-api-token (Please head to the bottom of the page and the section "Using environment variables to login")

Shafeeq January 17, 2025

To avoid running these commands again and again, you can make the variable persistant by adding them in your shell's config file

Open Your Shell Configuration File

You can use your favorite editor (nano, vim, etc.,), i used nano here

nano ~/.bashrc

Add the Variables

Add the lines at the end of the file

export FORGE_EMAIL="your-mail"
export FORGE_API_TOKEN="your-api-token"

Save and Exit

Save the file and close the editor.

(For nano press -> Ctrl + O to save & Ctrl + X to exit)

Reload the Shell Configuration

Run the command to apply the changes:

source ~/.bashrc

You can check if the variables are set by running below commands.

echo $FORGE_EMAIL
echo $FORGE_API_TOKEN
Shubham Sharma January 20, 2025

Hi @Shafeeq ,
I have tried this steps but still getting the same issue.
i.e : 


✕ Logging you in...

Error: The CLI couldn't securely store your login credentials in a local keychain. Ensure you have libsecret installed. If a local keychain is not available, use environment variables before trying again. See https://go.atlassian.com/dac/platform/forge/getting-started/#log-in-with-an-atlassian-api-token for more.

Shafeeq January 20, 2025

Hi @Shubham Sharma

By doing this you can skip the 

forge login

step, and directly execute forge commands for creating project, deploying it, installing it and others.

Eg.

forge deploy
0 votes
Nagarajan Balasubramanian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 22, 2025

@Shafeeq https://community.developer.atlassian.com/t/unable-to-login-to-forge/93999

Have raised a similar query here, kindly check and support.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events