Create new branch for Development with forest New agent

Hello @jacques_liao

Indeed, this is the development environment of your project. I cannot reproduce the issue, so I’m convinced it comes from a specificity of your installation.
Can you try to do the following steps :

  • create a new environment
  • copy your server files to a new folder, and edit the .env to add the env-secret of the new environment
  • start the new server
  • check that you can access it in your browser.
  • In the same folder of this server, try to execute “forest branch”

Send me the results here

Hello Enki,

I can’t create a new environment at the moment. Should I delete our current environment?

Kind regards

Hello @jacques_liao ,

Don’t delete it if you have any layout customizations on this environment or you’ll lose them.
If it’s ok to delete it, yes, you’ll then have to execute forest init in your console to create a new development environment and update your .env with the new env secret.

Hopefully you’ll then be able to execute forest branch normally.

Kind regards

I have to delete the Staging environment for example, right?

No, from your screen, you don’t have any development environment, so you just have to do forest init from your local server folder and it will create a new dev environment.

I have this error:

I don’t have much information from your screen, and I don’t know the specificities of your installation. Can you share a bit more :

  • what are the command(s) you executed to have this error ?
  • where did you execute the command(s) ? What is the content of the folder ? what environment does the env secret in your .env correspond to ?
  • are you logged in with an admin user of your project (forest logout/forest login to be sure) ?
  • maybe share the code that starts your agent if all the previous questions seems not to highlight any wrong setup.

Sorry not being able to give your a quick answer :confused:

1 Like

No problem,

  • Then, concerning the command, I run forest init, which gives me the error
  • I executed the command at the same location as our .env
  • when I do forest user I have my account connected

And in the code, we call our variables with our own function that reads the contents of a file

secretReader.readContent()

We’ve also removed our function, but nothing changes

Thanks for the detailed reply,

You can try to remove the env secret from your .env, and execute forest init again. It will ask you to select a project, and give you the env secret that you can paste in your .env.

4 Likes

that’s right, thank you very much for your help @Enki @Nicolas.M !

1 Like

Excellent ! I’m glad that it worked ! I close the topic then.
Have a nice day !

1 Like