Fetching branches fails

Erf... I'm sorry this fix doesn't apply to your case, I really thought every one on this thread was having the same problem.

Maybe you can try this, it won't provide you with a solution, but it should give information on the issue :

  1. Run the "locale" command just to double-check everything is "en_US" or "en_GB"

  2. Follow the steps to revert to master branch
    sudo rm /etc/pihole/ftlbranch
    pihole checkout master

  3. Type the following command and write down the the date / time of the "/etc/.pihole" directory :
    ls -la /etc/ | grep "\.pihole"

  4. Wait for a few minutes (at least one)

  5. Confirm your PiHole can access the Internet (ping google.com for example)

  6. Follow the steps to install beta version (echo "FTLDNS"... pihole checkout...), it will fail again

  7. Then run the ls -la /etc/ | grep "\.pihole" again and compare the date / time with the one on step 3

If the time of this directory has changed, it should indicate that the new sources have been fetched. This is in no way a "scientific" test, but that should give a clue whether the issue happens when fetching the sources or later. Alternatively you can use "du -h /etc/.pihole" on steps 3 and 7 to get the size of the directory and see it has changed.
If I get this correctly (devs please correct me if I'm wrong), the "pihole checkout" command first fetches the selected branch sources through GIT, then runs the installer located in "/etc/.pihole/automated\ install/basic-install.sh", but as there is no "verbose" mode, the error looks exactly the same whether the update fails during sources fetching or when running the installer.
But if the time (and / or size) of the ".pihole" directory was modified, this should indicates the fetching sources step went OK, but the installer failed later (for example when your locales are not en_GB / en_US in my case).
Then maybe you can try to manually run "sudo /etc/.pihole/automated\ install/basic-install.sh" and see if it displays more detailed errors or anything that could help identifying the issue (but wait for a dev to confirm - or not - that there is no problem with manually launching the installer and it won't break your PiHole).

1 Like

Thank you for your help. Here's the output. Nothing changed...

root@DietPi:/etc/.pihole# sudo git status
Auf Branch master
Ihr Branch ist auf dem selben Stand wie 'origin/master'.
nichts zu committen, Arbeitsverzeichnis unverändert
root@DietPi:/etc/.pihole# sudo dpkg-reconfigure locales
Generating locales (this might take a while)...
  de_DE.UTF-8... done
  en_GB.UTF-8... done
  en_US.UTF-8... done
Generation complete.
root@DietPi:/etc/.pihole# sudo rm /etc/pihole/ftlbranch
root@DietPi:/etc/.pihole# pihole checkout master
  Please note that changing branches severely alters your Pi-hole subsystems
  Features that work on the master branch, may not on a development branch
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
  Have you read and understood this? [y/N] y

  [i] Shortcut "master" detected - checking out master branches...
  [i] Pi-hole core
  [✓] Switching to branch: 'master' from 'refs/heads/master'
  [i] Already up-to-date.
  [i] Web interface
  [✓] Switching to branch: 'master' from 'refs/heads/master'
  [i] Already up-to-date.
  [✓] Detected ARM-hf architecture (armv7+)
  [✓] Installing FTL
root@DietPi:/etc/.pihole# ls -la /etc/ | grep "\.pihole"
drwxr-xr-x   9 root   root    4096 Mär 18 17:20 .pihole
root@DietPi:/etc/.pihole# ping google.com
PING google.com (172.217.17.238) 56(84) bytes of data.
64 bytes from muc11s14-in-f14.1e100.net (172.217.17.238): icmp_seq=1 ttl=57 time=23.6 ms
64 bytes from muc11s14-in-f14.1e100.net (172.217.17.238): icmp_seq=2 ttl=57 time=22.8 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 22.853/23.230/23.608/0.407 ms
root@DietPi:/etc/.pihole# echo "FTLDNS" | sudo tee /etc/pihole/ftlbranch
FTLDNS
root@DietPi:/etc/.pihole# pihole checkout core FTLDNS
  Please note that changing branches severely alters your Pi-hole subsystems
  Features that work on the master branch, may not on a development branch
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
  Have you read and understood this? [y/N] y

  [✗] Fetching branches from https://github.com/pi-hole/pi-hole.git


root@DietPi:/etc/.pihole# pihole checkout web FTLDNS
  Please note that changing branches severely alters your Pi-hole subsystems
  Features that work on the master branch, may not on a development branch
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
  Have you read and understood this? [y/N] y

  [✗] Fetching branches from https://github.com/pi-hole/AdminLTE.git


root@DietPi:/etc/.pihole# ls -la /etc/ | grep "\.pihole"
drwxr-xr-x   9 root   root    4096 Mär 18 17:20 .pihole
root@DietPi:/etc/.pihole#

This isn't related to the LC_ALL=C change. That is just for some performance enhancements when sorting or searching a text file, but I'm not sure there's anything we do that would be effected by a change to locales settings?

1 Like

Could you please post the output of the locale command (no dpkg-reconfigure and no 's'), just to make sure every variable is set correctly ?
And in case you change locales with dpkg-reconfigure, don't forget to log out and log back in your SSH session, otherwise the modifications are not applied.
But it seems in your case the update process fails on fetching sources, and your Pi has no problem accessing the Internet.

Thank you.

After diggin a bit around I think i found the problem. The LC_ALL= was on de_DE.UTF-8 even after change the locale. After setting it manual with export LC_ALL=en_US.UTF-8 the checkout FTLDNS works.

The rest of the installation I will do later because at the moment I'm over VPN ssh on my system and don't want to risk stuck.

Will report then so...

3 Likes

We'll leave this here as the solution and see if it works for anyone else.

2 Likes

Actually I got it working setting my locale to en_GB instead of de_DE.
But when trying to update, this happens:

pi@fr0sh-pi:~ $ pihole -up
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] FTL: update available

[i] FTL out of date

[i] FTL Checks...
[✓] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary...
[✓] Downloading and Installing FTL

fatal: unable to access 'https://github.com/pi-hole/AdminLTE.git/': Could not resolve host: github.com
[i] Web Interface: up to date

[i] FTL version is now at
[✓] Starting pihole-FTL service
[✓] Enabling pihole-FTL service to start on reboot

Did you try the update process a second time?
Is github.com resolvable, e.g. ping -c 5 -i 2 github.com ?

EDIT: Nevermind. It worked. Have made something wrong. Now I'm on FTLDNS.

Thanx again

1 Like

I tried it a few times now, with no luck.
The core is ftldns but the web won't update. Also pihole -up still is not working... (But GitHub is reachable!)

pi@fr0sh-pi:~ $ ping -c 5 -i 2 github.com
-bash: ping -c: command not found
pi@fr0sh-pi:~ $ ping github.com
PING github.com (192.30.253.112) 56(84) bytes of data.
64 bytes from lb-192-30-253-112-iad.github.com (192.30.253.112): icmp_seq=1 ttl=53 time=122 ms [...]

Note: i am using the "AAAA_QUERY_ANALYSIS=no" but i see aaaa-requests to GitHub when trying to update.
Could this be related?

Thanks! Switiching to en_US.UTF-8 did the trick!

Also worked for me somehow. Had the same problem. I had en_US configured as my main language but de_DE as my secondary. After disabling de_DE everything works fine. Strange...

1 Like

This was a separate issue which is already resolved. See

for further info.

I'm still scratching my head why this is like that. I might have to install it on a Pi, configure this to German and then try to checkout FTLDNS there myself...