recently I used the GitHub to uppload my project on it. but when another my friend want to sync with my project he can’t find the .env file
how should I do now?
recently I used the GitHub to uppload my project on it. but when another my friend want to sync with my project he can’t find the .env file
how should I do now?
2
Answers
Check your .gitignore file.
I think this is included in .gitignore file so that it is not included and not uploaded to github.
Since, .env file includes your project specific secrets and configurations, it shouldnot be exposed to others.
However, If you want to upload it anyway, remove its entry on .gitignore file. This may resolve your issue.
As Shiva answered, the file is ignored by git because it’s mentioned in your .gitignore file. You could remove it from the file so you can upload it as long as you are aware of the security implications. A better option would be to encrypt it. Since Laravel v9.23 you can encrypt your .env file with Artisan using
env:encrypt
and decrypt withenv:decrypt
See: https://laravel.com/docs/10.x/configuration#encryption