Login MacOS not working

Really struggeling to login in with the cli…

forge --version
11.2.0

forge login
... enter mail
... enter token 

–>Error: The CLI couldn’t securely store your login credentials in a local keychain. Ensure you enable access to the macOS keychain when prompted. 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.

Using Env Vars doesn’t work, it just asks again for the mail and token and gives same error.
Running verbose even shows that i get user information but still asking for mail again … no additional info…

sh-3.2$ FORGE_EMAIL=s..oud FORGE_API_TOKEN=ATAT...6B forge login --verbose
▶️  GraphQL https://api.atlassian.com/graphql
Query: 
        query forge_cli_getUserDetails {
          me {
            user {
              name
              accountStatus
              accountId
            }
          }
        }
Variables: {}
◀️  GraphQL
Request ID: 590...d13f0
Result: {
  "me": {
    "user": {
      "name": "Steven Hooker",
      "accountStatus": "active",
      "accountId": "712...65"
    }
  }
}
Log in to your Atlassian account
Press Ctrl+C to cancel.

? Enter your email: () 

any help is appreciated

Hi Steven, thanks for contacting us.

Please note that, as per https://go.atlassian.com/dac/platform/forge/getting-started/#log-in-with-an-atlassian-api-token (see the last blue box at the bottom), when environment variables are used, you don’t need to use forge login.

So you can do

export FORGE_EMAIL=mymail@example.com
export FORGE_API_TOKEN=ATAT...

# no forge login needed, every 'forge' command will use these env vars as credentials

forge create

If you want to use environment variables with forge login you can do something like, though again forge login won’t be needed as all commands will use env vars anyway.

export FORGE_EMAIL=mymail@example.com
export FORGE_API_TOKEN=ATAT...

forge login -u $FORGE_EMAIL -t $FORGE_API_TOKEN

But please note that environment variables will override the credentials used for forge login. For instance

export FORGE_EMAIL=mymail@example.com
export FORGE_API_TOKEN=ATAT...

forge login -u different.mail@example.com -t DIFFERENTAPITOKEN...

forge create

The last forge create command here will use the exported env vars as credentials, not the ones used for forge login command.

Please let us know if this solves your problem and/or if you need help with anything else.

Thanks Mehmet. ```
forge create

works :)
Just could have saved me 3 hours, just by reading your post fully...