# Fetching branches fails

**URL:** <https://discourse.pi-hole.net/t/fetching-branches-fails/8292>\
**Category:** Help\
**Tags:** ftldns-beta\
**Created:** [March 25, 2018, 11:41pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292 "2018-03-25T23:41:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 25, 2018, 11:41pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/1 "2018-03-25T23:41:46Z")

</div>

Hi,

I'd be glad to help beta test this brand new FTLDNS but can't get the new branch to download.  
Of course I have the git client installed on my Raspbian Stretch, everything is up-to-date, here's what I get when running the above commands :

 ![FTLDNS-update](https://discourse.pi-hole.net/uploads/default/original/2X/f/f2ab7c0c85b88512b08508f271932ad6afc6e61c.PNG)

What did I miss ?

(In case this is relevant, I precise my current Pi-Hole is configured with Dnscrypt-Proxy 2.0.7 / DNSSec disabled using this doc and runs flawlessly : [https://github.com/pi-hole/pi-hole/wiki/DNSCrypt-2.0](https://github.com/pi-hole/pi-hole/wiki/DNSCrypt-2.0))

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [March 25, 2018, 11:59pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/2 "2018-03-25T23:59:18Z")

</div>

What happens when you

```auto
cd /var/www/html/admin
sudo git fetch --all
cd /etc/.pihole
sudo git fetch --all

```

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 26, 2018, 12:11am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/3 "2018-03-26T00:11:46Z")

</div>

The first git command runs OK.  
The second one returns the error "fatal: Not a git repository (or any of the parent directories): .git".

It appears I don't have ".git" file in /etc/pihole  
But using "locate" command I found a have a ".git" file in /etc/.pihole (with a dot before "pihole", it's a hidden directory).

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [March 26, 2018, 1:55am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/4 "2018-03-26T01:55:01Z")

</div>

Sorry, `/etc/.pihole` is the correct directory.

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 26, 2018, 10:48am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/5 "2018-03-26T10:48:50Z")

</div>

OK, using the /etc/.pihole directory went OK, but the pihole checkout out commands still fail :

 ![Capture](https://discourse.pi-hole.net/uploads/default/original/2X/2/292a1679370faa0c84c531480d994d2a81047fb3.PNG)

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [March 26, 2018, 11:06am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/6 "2018-03-26T11:06:29Z")

</div>

Can your Pi-hole device reach the Internet?

Try sending us a debug token.

```auto
pihole -d

```

or do it through the Web interface:

> [@How do I debug my Pi-hole installation?](https://discourse.pi-hole.net/t/how-do-i-debug-my-pi-hole-installation/3104):
>
> Login into your Pi-hole's command line Enter sudo pihole -d Provide us with the debug token that is generated after the debug script completes Alternative: Securely sending us additional information Preferred Method If there is additional information you want to provide us, you can upload any kind of text to our server. You will still get a debug token so your information will remain anonymous. To do this, you can pipe some shell output into netcat, which will upload it to our [secure server](https://pi-hole.net/2016/11/07/crack-our-medical-tricorder-win-a-raspberry-pi-3/). …

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 26, 2018, 11:45am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/7 "2018-03-26T11:45:00Z")

</div>

Yeah my device can reach the Internet, both IPv4 and IPv6 and is currently used as the only DNS resolver for my whole network with no issues.

I've uploaded the log (debug token itj3u4q5h8), oddly my FTL version seems to be "vDev-a1b2fa0" as if the update process worked, but I still have the "master" version of Core and Web.

I can proceed to a complete uninstallation / reinstallation if you think that can help, the only tweaks I made where to use DNScrypt-Proxy 2 and adding a "min-cache-ttl" directive in dnsmasq.conf.

Thanks for you help !

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 26, 2018, 7:34pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/8 "2018-03-26T19:34:17Z")

</div>

I uninstalled Pihole completely (including package dependancies), then reinstalled it and got a new Pihole install up in no time, chose Google DNS and kept default config for everything else, checked everything was runing smoothly, which was the case.

Then I tried to switch to beta version using the same commands :  
echo "FTLDNS" | sudo tee /etc/pihole/ftlbranch  
pihole checkout core FTLDNS  
pihole checkout web FTLDNS

But again same problem as described in my first screenshot.

And there's no error when typing :

```
cd /var/www/html/admin
sudo git fetch --all
cd /etc/.pihole
sudo git fetch --all

```

---

<div class="post-metadata">

**Author:** ![bgx](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bgx/32/8033_2.png) [@bgx](https://discourse.pi-hole.net/u/bgx)\
**Post date:** [March 26, 2018, 8:47pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/9 "2018-03-26T20:47:08Z")

</div>

+1 here the same on Debian Jessie running odroid xu4.

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [March 26, 2018, 11:27pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/10 "2018-03-26T23:27:35Z")

</div>

Anyone in this thread, what is the output of

```auto
cd /var/www/html/admin
sudo git status
cd /etc/.pihole
sudo git status

```

---

<div class="post-metadata">

**Author:** ![Rico\_Lino](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/rico_lino/32/3201_2.png) [@Rico\_Lino](https://discourse.pi-hole.net/u/Rico_Lino)\
**Post date:** [March 27, 2018, 6:24am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/11 "2018-03-27T06:24:46Z")

</div>

root@fr0sh-pi:/var/www/html/admin# sudo git status  
Auf Branch master  
Ihr Branch ist auf dem selben Stand wie 'origin/master'.  
nichts zu committen, Arbeitsverzeichnis unverändert

root@fr0sh-pi:/var/www/html/admin# cd /etc/.pihole  
root@fr0sh-pi:/etc/.pihole# sudo git status  
Auf Branch master  
Ihr Branch ist auf dem selben Stand wie 'origin/master'.  
nichts zu committen, Arbeitsverzeichnis unverändert

(it should be something like "on master branch / nothing to commit")

---

<div class="post-metadata">

**Author:** ![bgx](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bgx/32/8033_2.png) [@bgx](https://discourse.pi-hole.net/u/bgx)\
**Post date:** [March 27, 2018, 7:25am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/12 "2018-03-27T07:25:04Z")

</div>

root@DietPi:~# cd /var/www/html/admin  
root@DietPi:/var/www/html/admin# sudo git status  
Auf Branch master  
Ihr Branch ist auf dem selben Stand wie 'origin/master'.  
nichts zu committen, Arbeitsverzeichnis unverändert  
root@DietPi:/var/www/html/admin# cd /etc/.pihole  
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#

---

<div class="post-metadata">

**Author:** ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)\
**Post date:** [March 27, 2018, 4:03pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/13 "2018-03-27T16:03:28Z")

</div>

@jacob.salmela English translation for the above reportings:

_On branch master_  
_Your branch is up-to-date with 'origin/master'._  
_nothing to commit, working tree clean_

for both, '/var/www/html/admin' and '/etc/.pihole'

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 27, 2018, 4:54pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/14 "2018-03-27T16:54:06Z")

</div>

Yeahhh !!! Finally solved it ! What gave me a hint is that all the people in this thread seem to have a "localized" (non-English) version of Linux.

So just to give it a try I changed my "locales" settings to switch to "en\_US.UTF-8", and this time the updated worked fine !

Here are the steps (careful ! this operation will change all settings related to language, date format, etc., but can be rolled back to your language whenever you need to) :

1. Type "sudo dpkg-reconfigure locales"
2. Then choose "en\_US.UTF-8" and chose it as a default locale on the next screen
3. Log out and log back in (to apply the modifications on your session)
4. Proceed with the update commands (echo "FTLDNS"...)

Everything now works fine and the update is applied !

Note that maybe instead of changing the whole default locales, it might be possible to juste enter : export LANG="en\_US.UTF-8" then proceed with the update, but I haven't tested this solution.

I guess that the update scripts use the date format or something "localized" and it not working when formatted as FR / DE / etc.

---

<div class="post-metadata">

**Author:** ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)\
**Post date:** [March 27, 2018, 5:18pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/15 "2018-03-27T17:18:18Z")

</div>

Even if I'm from Germany, my _$LANG_ is set to _en\_GB.UTF-8_, and there were no problems while switching to the FTLDNS branch.

---

<div class="post-metadata">

**Author:** ![Samioul](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/samioul/32/3178_2.png) [@Samioul](https://discourse.pi-hole.net/u/Samioul)\
**Post date:** [March 27, 2018, 5:24pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/16 "2018-03-27T17:24:22Z")

</div>

en\_GB.UTF-8 is almost identical to en\_US UTF8 (same date / number formatting), while FR / DE is very different, so I'm not surprised it works with en\_GB.UTF-8.

---

<div class="post-metadata">

**Author:** ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)\
**Post date:** [March 27, 2018, 6:03pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/17 "2018-03-27T18:03:04Z")

</div>

My comment was just an approval for your finding 🙂 Good job 👍

---

<div class="post-metadata">

**Author:** ![bgx](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bgx/32/8033_2.png) [@bgx](https://discourse.pi-hole.net/u/bgx)\
**Post date:** [March 27, 2018, 7:55pm UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/18 "2018-03-27T19:55:35Z")

</div>

Sadly this doesn't fix it here. I've the same error after changing locales.

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [March 28, 2018, 3:28am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/19 "2018-03-28T03:28:50Z")

</div>

> [@Samioul](#):
>
> So just to give it a try I changed my “locales” settings to switch to “en\_US.UTF-8”, and this time the updated worked fine !

@DanSchaper is this related to the `LC_ALL=C` we've seen fix some issues in the past?

---

<div class="post-metadata">

**Author:** ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)\
**Post date:** [March 28, 2018, 7:49am UTC](https://discourse.pi-hole.net/t/fetching-branches-fails/8292/20 "2018-03-28T07:49:43Z")

</div>

The output of `locale` on my system is

> LANG=en\_GB.UTF-8  
> LANGUAGE=  
> LC\_CTYPE="en\_GB.UTF-8"  
> LC\_NUMERIC="en\_GB.UTF-8"  
> LC\_TIME="en\_GB.UTF-8"  
> LC\_COLLATE="en\_GB.UTF-8"  
> LC\_MONETARY="en\_GB.UTF-8"  
> LC\_MESSAGES="en\_GB.UTF-8"  
> LC\_PAPER="en\_GB.UTF-8"  
> LC\_NAME="en\_GB.UTF-8"  
> LC\_ADDRESS="en\_GB.UTF-8"  
> LC\_TELEPHONE="en\_GB.UTF-8"  
> LC\_MEASUREMENT="en\_GB.UTF-8"  
> LC\_IDENTIFICATION="en\_GB.UTF-8"  
> LC\_ALL=

[Next page](https://discourse.pi-hole.net/t/fetching-branches-fails/8292.md?page=2)
