Can't login via cli

We use this code to create a new Forest environment

 shell.exec(`forest login -t ${forestToken} -e ${forsetEmail}`)

  const forest = shell.exec(
    `forest environments:create -n ${appName} -u ${appUrl} --format json`,
    { async: true },
  )

It used to work well but recently it stopped working.

We get the following output:

> Login successful 
× Please use 'forest login' to sign in to your Forest account.
  • Package Version: 2.2.7

Hi @Anna_Reuven :wave: welcome to our community.
I tested it right now and i think your forestToken is not valid or no longer valid.
How do you get this token?

2 Likes

It was indeed a token issue.
We generated a new one and now it works.
Thanks for your help :slight_smile: