I have just come here to post about the exact same problem!
Strange Deployment
I tried deploying a project from my BitBucket repo today. It kept failing stating it couldn't connect to the mysql database forge@localhost using password No.
I added my custom .env several times and specified a different database but still it kept failing.
On deploy it was overwriting my .env with generic credentials for some reason.
The solution was to install from the repository with the install composer dependencies unchecked. Then add custom .env. Then ssh into the server and run composer install manually.
Why would this happen?, its the first time i've had the issue with forge and currently have 6 other projects hosted and deployed ok.
I thought maybe the .env was in the repository hence why it changed on deploy but that wasn't the case.
Please or to participate in this conversation.