I’m currently having issues re-provisioning my Staging server in DigitalOcean. I’m able to re-provision locally and in production using the Trellis CLI, but I have no idea why it’s failing on Staging. I can see in the logs that it failed to connect to host via SSH, but I can SSH into all environments without any issues using trellis ssh staging. Any ideas what’s causing it to fail?
I don’t think this is the issue because the error doesn’t look the same, but sometimes provisioning or deployments fail to connect via ssh for me because the ssh key is no longer in my keychain for whatever reason.
Try this command to add it back in and then try re-provisioning.
Also running apt update manually on the staging server could help showing the error that occurs when updating apt, e.g. a network issue, insufficient disk space, a stray apt lockfile.
@strarsis I did try to run apt update manually on the server and here’s the error I got:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repos.insights.digitalocean.com/apt/do-agent main InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY <KEY_HERE>
W: Failed to fetch https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY <KEY_HERE>
W: Some index files failed to download. They have been ignored, or old ones used instead.
~$ sudo apt update
Get:1 http://nginx.org/packages/mainline/ubuntu jammy InRelease [3,602 B]
Hit:2 http://ppa.launchpad.net/ondrej/php/ubuntu jammy InRelease
Hit:3 http://de.archive.ubuntu.com/ubuntu jammy InRelease
Err:1 http://nginx.org/packages/mainline/ubuntu jammy InRelease
The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
Hit:4 https://mirror.rackspace.com/mariadb/repo/10.6/ubuntu jammy InRelease
Hit:5 http://de.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://de.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:7 http://de.archive.ubuntu.com/ubuntu jammy-security InRelease
Fetched 3,602 B in 1s (5,858 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: http://nginx.org/packages/mainline/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://nginx.org/packages/mainline/ubuntu jammy InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
W: http://ppa.launchpad.net/ondrej/php/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://mirror.rackspace.com/mariadb/repo/10.6/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: Failed to fetch http://nginx.org/packages/mainline/ubuntu/dists/jammy/InRelease The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.