That looks odd. If the forge user can connect via ssh then maybe the DB user is the problem. Forge servers expect a forge user and a forge db user.
Error while deploying to the server
Hello! I have just created new server running Ubuntu 16.04, added it to Forge (configured to use PHP 7.2), logged into root and ran code provided by Forge. Then added the site and attached GitLab repository. Code was deployed from master branch, everything worked fine.
Then I have added new file to the root folder of the repository. As I have enabled Quickly Deploy, Forge tried to deploy latest version from repository. And... it failed. In the output I see following:
Tue Oct 17 21:22:22 UTC 2017
From gitlab.com:foo/bar
* branch master -> FETCH_HEAD
Already up-to-date.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Package manifest generated successfully.
[sudo] password for forge: Sorry, try again.
[sudo] password for forge:
sudo: 1 incorrect password attempt
I'm not sure, but I think system cannot log into forge user. I have checked /home/forge/.ssh/authorized_keys and /root/.ssh/authorized_keys files - SSH key is present in the both of them. I have also checked connection to the server from the Forge homepage - and got Successful status.
Any ideas what I did wrong? How I can fix it?
Thanks. Sincerely, Ilya
I have recreated the server from scratch and provided SSH key for the root user (Instead of simply providing a password). The problem is gone.
Please or to participate in this conversation.