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

Ltloafer's avatar

Struggling to get project onto server

Hi,

I'm very new to all of this so please forgive my ignorance!!

I've set up my server following Jeff's lesson (using Digital Ocean) but get this error each time I try to install the repository (from Bitbucket):

Generating autoload files Generating optimized class loader Compiling common classes

[PDOException]
SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)

I have become quite confused over a few things:

  1. The lesson mentions API key but I can't see any reference to it in forge.
  2. Bitbucket has emailed an SSH Key and I'm not sure what to do with it.
  3. I've recieved username and password details in an email from Forge and not sure what to do with them.
  4. It is just the SSH key from Digital Ocean that I enter into forge?

Any help would be appreciated! Thanks

0 likes
2 replies
sitesense's avatar

[PDOException] SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)

You need to set up your environment variables.

From forge, go to manage your site. Click the "Environment" tab and then set the Key/Value pairs for your application.

For example 'key' = DB_HOST - 'value' = Your server IP address.

DB_NAME - forge

DB_USERNAME - forge

DB_PASSWORD - the database password that was emailed to you

... and so on.

With regards the API key, if you use the DigitalOcean (2.0) option when creating the server, you are not required to enter the API key so can ignore it.

The SSH key from Bitbucket should probably be entered when you set up the Git option (in Forge). I can't quite remember the process and would need to set up a new server to see that again.

Ltloafer's avatar

Thanks sitesense. Much appreciated. I'm giving it a go!..

Please or to participate in this conversation.