Installation pihole fails on Raspbian Stretch Lite

Please follow the below template, it will help us to help you!

Expected Behaviour:

Pihole ought to bei installed

Actual Behaviour:

Pihole is not installed with the error message "Cloning https://github.com/pi-hole/pi-hole.git into /etc/.pihole...Unable to clone repository, please contact support"

Debug Token:

not available

Is this the same kind of issue as seen here? Can't clone on Debian 9.2.1 · Issue #1770 · pi-hole/pi-hole · GitHub

Please run this and share the output here:

dpkg -l ca-certificates

Here is the ouput:

"Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version        Architecture   Description
+++-===================-==============-==============-===========================================
ii  ca-certificates     20161130+nmu1  all            Common CA certificates
"

What is the output of this command?

sudo git clone https://github.com/pi-hole/pi-hole.git /etc/.pihole

It can't be the known certificate issue because you have the ca-certificates package correctly installed.

Here is the output of the above command:
Cloning into '/etc/.pihole'...
fatal: unable to access 'https://github.com/pi-hole/pi-hole.git/': Could not resolve host: github.com

It seems, that the raspi cannot resovle the server "github.com". I just made a check with ping: The current lite installation does not "know" the DNS servers it gets via DHCP from the router.

The peculiar thing is, that the pihole installation and the DNS resolving works fine on Debian PIXEL installation on a second raspi also geting the DNS servers from the DCHP server from the router.

I have found a solution: After the installation of raspian STRETCH LITE the DNS resolving worked. But during the installation pihole modifies incorrectly the file dhcpcd.conf. It creates correctly a static ip address for eth0 but then state the nameserver as 127.0.0.0 instead of the local DNS server 192.168.1.1.
Now i have manually added the DNS server 192.168.1.1 (my router) and now the installtion runs without any problem.