Installations fail - no connection

Brand new image for an OrangePi Zero. All initial updates are fine. Headless, access by SSH, running as wired network only.

Installing PiHole from DietPi-Software results in this error:

Unable to Install Pi-hole: block adverts for any device on your network is offline and/or unreachable.

I have tried several times. On my last attempt, I checked I could Ping the above domain. I am guessing a service of some sort is getting switched off too early.

I am also getting the same problem with PiVPN.

(edit 2)
I tried to simply pull in the install files with curl and I get this error message. Likely to be the problem but not idea how to fix it (I’ll keep looking)!

root@DietPi:~# curl -L
curl: (60) SSL certificate problem: certificate is not yet valid
More details here:

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

This issue is cause by the date being too far out.

When I created the DietPi instance I edited the config file and selected ‘Daemon + Drift’ as the ntp method. It seems that if the time is too far out, this does not set the correct time initially. Setting the ntp method to ‘Boot + Hourly’ solves the installation problem.

I’ve seen ntp issues like this on other Pis (running other images).

I’ll open a GitHub issue. I guess it needs to be ‘Boot, Daemon + drift’.

Did you run an apt-get update and apt-get upgrade before you try to install the pivpn?

Yes that runs as part of the DietPi install process AFAIK. I was installing from dietpi-software.