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

pabloledesma's avatar

We were unable to deploy your project to your server

I had this error... We had trouble connecting to your server. Typically, this means there is a problem with the SSH keys on the server. Or, your server may be prompting for a password when Forge attempts to SSH in as the root user.

Error Output

Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts. From github.com:Pabloledesma/demo.app

  • branch master -> FETCH_HEAD Already up-to-date. You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug Loading composer repositories with package information Installing dependencies from lock file Nothing to install or update Generating autoload files

php artisan clear-compiled php artisan optimize Generating optimized class loader Compiling common classes

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

Couldn't SSH Into Server?

Please make sure that the following SSH key is placed in both the /home/forge/.ssh/authorized_keys file and the /root/.ssh/authorized_keys file on your server.

0 likes
2 replies
bobbybouwmann's avatar

Well the error is pretty clear. Place the ssh key in both directories... If you can't get it to work you can always ask a question for support by clicking in the right bottom corner on the bar with "Have a question?" https://forge.laravel.com/

pabloledesma's avatar

This is what I tried ...

forge@billowing-winds:~$ sudo cp /home/forge/.ssh/authorized_keys /root/.ssh/authorized_keys [sudo] password for forge: forge@billowing-winds:~$ cd /home/forge/.ssh forge@billowing-winds:~/.ssh$ ls -l total 16 -rwxr-xr-x 1 forge forge 667 Nov 26 21:38 authorized_keys -rwx------ 1 forge forge 1675 Nov 26 20:16 id_rsa -rwxr-xr-x 1 forge forge 402 Nov 26 20:16 id_rsa.pub -rwxr-xr-x 1 forge forge 3536 Nov 26 22:05 known_hosts forge@billowing-winds:~/.ssh$ sudo cp ./id_rsa.pub /root/.ssh/ forge@billowing-winds:~/.ssh$ sudo cp ./id_rsa /root/.ssh

... and the error persists

What can I do?

Please or to participate in this conversation.