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

SiNi_Si's avatar

Forge not adding full github repo

What do you do if forge does not add all the files from your GitHub repo?

I made a AWS server instance and when I add my GitHub repo I just get an defalt env. file and it only take a half a second to add repo to server.

I have a private repo with my vendor directory and env. file due to the laravel braintree problem.

\looks like the only option is try try and add the repo again, but I get a default env. file and a 500 error when I hit the site.

Also on a side note, how would you get other files on the server after deployed? Under AWS there is no instance once forge makes the server.

Thanks

0 likes
4 replies
tykus's avatar
tykus
Best Answer
Level 104

The .env file is typically not included in your Git repo for reasons of security of your various credentials. You can define Environment Variables directly on your instance, or indeed define the production environment variables in Forge.

The vendor directory is a side effect of running composer install - based on either the composer.json or composer.lock files, it contains all of the dependencies that your app needs, and can be created whenever you deploy your project. A deploy script will comprise the commands necessary to (i) pull the code (if you are not using webhooks) and (ii) run any deployment commands including composer install and perhaps npm run production.

Cronix's avatar

Just log into your Forge control panel. Select the server, select the site. Now on the left, there is an Environment tab. You can edit the .env there. If everything is the same as your dev environment, just copy/paste your env there (except changing APP_ENV=production, APP_DEBUG=false, etc)

Please or to participate in this conversation.