Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AlbertJames's avatar

SETUP - Homestead + gitHub + Forge - Error - Whoops looks like something went wrong

Okay, so.. just because it took me ages to undestand (mainly because I am new to laravel) I want to pinpoint the problem that took me two days to find...

So basically I am using Homestead + gitHub + Forge on a digitalOcean droplet. My homestead installation and new project creation went fine, the local server is up and running and laravel is working. GitHub is linked with forge and deploy automatically. YET !

I was having this error : whoops, looks like something went wrong.

The problem was : .env not commited to gitHub

Explanation : .env is not commited to gitHub because holds sensitive information. It is initially set in your .gitignore file.

How to fix it : copy and paste your local .env text into your forge site through the web app (environnement panel) - change access codes for the Db.

Ik, all the pros are laughing at me right now :)

0 likes
4 replies
willvincent's avatar

the .env file is excluded from git. It's listed in the .gitignore file so that it won't be commit. This is a good thing because you don't want production keys getting out into the wild, or accidentally overwriting them with development settings, etc.

Do you have a question?

1 like
juandmegon's avatar

Hello @AlbertJames

That is basically the solution. You can also use the .env.example file to put all the required pair of keys tha you app use (of course without the real data, just examples), so basically wath you have to do is to copy/rename that file in a .env file and just change the values to the real ones.

Just another way to do the same :P.

1 like
AlbertJames's avatar

thank you for the replies, it was not a question just a solution maybe others could find ( i couldn't ) if they face the same error.

Please or to participate in this conversation.