Upgrading pihole: Could not update local repository. Contact support

To my knowledge the only thing I have ever changed is adding an entry to /etc/dnsmasq.conf.default to forward all internal requests for my local NextCloud install to a local IP.

Expected Behaviour:

Running pihole -up will update pihole

Actual Behaviour:

I receive the following error:

pi@raspberrypi:/etc $ pihole -up
  [i] Checking for updates...
  [i] Pi-hole Core:     up to date
  [i] Web Interface:    update available
  [i] FTL:              update available

  [i] Pi-hole Web Admin files out of date, updating local repo.
  [✓] Check for existing repository in /var/www/html/admin
  [i] Update repo in /var/www/html/admin...
  : Could not update local repository. Contact support.
pi@raspberrypi:/etc $

Debug Token:

https://tricorder.pi-hole.net/tq7pc73gp4

DietPi used to modify the permissions of files in that directory. It looks like you are still on version 4 of the web interface and that is rather old. To confirm, run the below command and paste the output.

cd /var/www/html/admin
sudo git status
sudo ls -la

You are correct that I am version 4.

pi@raspberrypi:/var/www/html/admin $ sudo git status
On branch master
Your branch is behind 'origin/master' by 211 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
nothing to commit, working tree clean
pi@raspberrypi:/var/www/html/admin $

Please post the output from the above command as well.

pi@raspberrypi:/var/www/html/admin $ sudo ls -la
total 264
drwxr-xr-x 7 root     root      4096 Oct 20  2018 .
drwxrwxr-x 4 www-data www-data  4096 May 20  2019 ..
-rw-r--r-- 1 root     root      9958 Oct 20  2018 api_db.php
-rw-r--r-- 1 root     root      8130 Oct 20  2018 api_FTL.php
-rw-r--r-- 1 root     root      3002 Oct 20  2018 api.php
-rw-r--r-- 1 root     root      2794 Apr 30  2018 auditlog.php
-rw-r--r-- 1 root     root      2339 Apr 30  2018 CONTRIBUTING.md
-rw-r--r-- 1 root     root      2200 Apr 30  2018 db_graph.php
-rw-r--r-- 1 root     root      4229 Apr 30  2018 db_lists.php
-rw-r--r-- 1 root     root      4536 Apr 30  2018 db_queries.php
-rw-r--r-- 1 root     root       949 Apr 30  2018 debug.php
drwxr-xr-x 8 root     root      4096 Dec  6 19:14 .git
drwxr-xr-x 2 root     root      4096 Apr 30  2018 .github
-rw-r--r-- 1 root     root       153 Apr 30  2018 .gitignore
-rw-r--r-- 1 root     root      1230 Oct 20  2018 gravity.php
-rw-r--r-- 1 root     root      9387 Oct 20  2018 help.php
drwxr-xr-x 2 root     root      4096 Apr 30  2018 img
-rw-r--r-- 1 root     root     10479 Oct 20  2018 index.php
-rw-r--r-- 1 root     root     14164 Apr 30  2018 LICENSE
-rw-r--r-- 1 root     root      2924 Oct 20  2018 list.php
-rw-r--r-- 1 root     root       652 Apr 30  2018 .pullapprove.yml
-rw-r--r-- 1 root     root      5475 Oct 20  2018 queries.php
-rw-r--r-- 1 root     root      1111 Oct 20  2018 queryads.php
-rw-r--r-- 1 root     root      9930 Oct 20  2018 README.md
drwxr-xr-x 4 root     root      4096 Apr 30  2018 scripts
-rw-r--r-- 1 root     root     87899 Oct 20  2018 settings.php
drwxr-xr-x 3 root     root      4096 Oct 20  2018 style
-rw-r--r-- 1 root     root       940 Oct 20  2018 taillog-FTL.php
-rw-r--r-- 1 root     root       932 Oct 20  2018 taillog.php
-rw-r--r-- 1 root     root        45 Apr 30  2018 .user.php.ini

Thanks, what happens when you run the following:

cd /var/www/html/admin
sudo git pull
Updating af8c926c..38d8e77f
pi@raspberrypi:/var/www/html/admin $

Okay, should be updated. Try pihole -v to confirm.

pi@raspberrypi:/var/www/html/admin $ pihole -v
  Pi-hole version is v4.3.2 (Latest: v4.3.2)
  AdminLTE version is v4.0 (Latest: v4.3.2)
  FTL version is v4.0 (Latest: v4.3.1)

38d8e77f is the latest commit identifier.

What is the result of:

cd /var/www/html/admin
git log -n 3
pi@raspberrypi:/var/www/html/admin $ git log -n 3
commit af8c926cefd3f06dbbba0131b7644a1bb45cd514
Merge: e48aa295 c8471441
Author: Dan Schaper <dan@glacialmagma.com>
Date:   Sun Aug 5 10:44:28 2018 -0700

    Merge pull request #795 from pi-hole/release/v4.0

    Release v4.0

commit c84714415262a87515a89ad567e9a13da353dd27
Merge: 1e7e0dc0 d9610ff6
Author: Mark Drobnak <mark.drobnak@gmail.com>
Date:   Fri Aug 3 23:28:58 2018 -0400

    Merge pull request #802 from pi-hole/devel

    Bring missing v4.0 changes into release branch

commit 1e7e0dc0f95075519ec27accd700fd227b49abb3
Merge: 210160c8 97023278
Author: DL6ER <DL6ER@users.noreply.github.com>
Date:   Thu Aug 2 12:20:55 2018 +0200

    Merge pull request #798 from pi-hole/fix/list-comments

    Ignore commented lines in list files

The git pull doesn't look like it did anything.

cd /var/www/html/admin
sudo GIT_TRACE=1 git pull
pi@raspberrypi:/var/www/html/admin $ sudo GIT_TRACE=1 git pull
20:46:59.416816 git.c:371               trace: built-in: git 'pull'
20:46:59.422932 run-command.c:350       trace: run_command: 'fetch' '--update-head-ok'
20:46:59.427964 exec_cmd.c:116          trace: exec: 'git' 'fetch' '--update-head-ok'
20:46:59.444303 git.c:371               trace: built-in: git 'fetch' '--update-head-ok'
20:46:59.463732 run-command.c:350       trace: run_command: 'git-remote-https' 'origin' 'https://github.com/pi-hole/AdminLTE.git'
20:47:01.687139 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
20:47:01.744673 run-command.c:350       trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
20:47:01.750163 exec_cmd.c:116          trace: exec: 'git' 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
20:47:01.766653 git.c:371               trace: built-in: git 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet'
20:47:01.995910 run-command.c:1130      run_processes_parallel: preparing to run up to 1 tasks
20:47:01.997909 run-command.c:1162      run_processes_parallel: done
20:47:01.999970 run-command.c:350       trace: run_command: 'gc' '--auto'
20:47:02.004330 exec_cmd.c:116          trace: exec: 'git' 'gc' '--auto'
20:47:02.021434 git.c:371               trace: built-in: git 'gc' '--auto'
20:47:02.030149 run-command.c:350       trace: run_command: 'merge' 'FETCH_HEAD'
20:47:02.035404 exec_cmd.c:116          trace: exec: 'git' 'merge' 'FETCH_HEAD'
20:47:02.052337 git.c:371               trace: built-in: git 'merge' 'FETCH_HEAD'
Updating af8c926c..38d8e77f

and then:

pi@raspberrypi:/var/www/html/admin $ pihole -v
Pi-hole version is v4.3.2 (Latest: v4.3.2)
AdminLTE version is v4.0 (Latest: v4.3.2)
FTL version is v4.0 (Latest: v4.3.1)

git says it updated from af8c926c (v4.0) to 38d8e77f (v4.3.2) but the git log shows nothing was updated and none of the files have changed. Leads me to think there is a problem with the filesystem directly. Is there anything that has been changed with mount points or are you running out of storage space on the partition?

Definitely not. The only thing I've ever done is install pi-hole using an image.

Okay, what is the output from

sudo mount and sudo df -h

pi@raspberrypi:/var/www/html/admin $ sudo mount and sudo df -h            
                                                                          
Usage:                                                                    
 mount [-lhV]                                                             
 mount -a [options]                                                       
 mount [options] [--source] <source> | [--target] <directory>             
 mount [options] <source> <directory>                                     
 mount <operation> <mountpoint> [<target>]                                
                                                                          
Mount a filesystem.                                                       
                                                                          
Options:                                                                  
 -a, --all               mount all filesystems mentioned in fstab         
 -c, --no-canonicalize   don't canonicalize paths                         
 -f, --fake              dry run; skip the mount(2) syscall               
 -F, --fork              fork off for each device (use with -a)           
 -T, --fstab <path>      alternative file to /etc/fstab                   
 -i, --internal-only     don't call the mount.<type> helpers              
 -l, --show-labels       show also filesystem labels                      
 -n, --no-mtab           don't write to /etc/mtab                         
 -o, --options <list>    comma-separated list of mount options            
 -O, --test-opts <list>  limit the set of filesystems (use with -a)       
 -r, --read-only         mount the filesystem read-only (same as -o ro)   
 -t, --types <list>      limit the set of filesystem types                
     --source <src>      explicitly specifies source (path, label, uuid)  
     --target <target>   explicitly specifies mountpoint                  
 -v, --verbose           say what is being done                           
 -w, --rw, --read-write  mount the filesystem read-write (default)        
                                                                          
 -h, --help     display this help and exit                                
 -V, --version  output version information and exit                       
                                                                          
Source:                                                                   
 -L, --label <label>     synonym for LABEL=<label>                        
 -U, --uuid <uuid>       synonym for UUID=<uuid>                          
 LABEL=<label>           specifies device by filesystem label             
 UUID=<uuid>             specifies device by filesystem UUID              
 PARTLABEL=<label>       specifies device by partition label              
 PARTUUID=<uuid>         specifies device by partition UUID               
 <device>                specifies device by path                         
 <directory>             mountpoint for bind mounts (see --bind/rbind)    
 <file>                  regular file for loopdev setup                   
                                                                          
Operations:                                                               
 -B, --bind              mount a subtree somewhere else (same as -o bind) 
 -M, --move              move a subtree to some other place               
 -R, --rbind             mount a subtree and all submounts somewhere else 
 --make-shared           mark a subtree as shared                         
 --make-slave            mark a subtree as slave                          
 --make-private          mark a subtree as private                        
 --make-unbindable       mark a subtree as unbindable                     
 --make-rshared          recursively mark a whole subtree as shared       
 --make-rslave           recursively mark a whole subtree as slave        
 --make-rprivate         recursively mark a whole subtree as private      

These are separate commands

sudo mount

sudo df -h

pi@raspberrypi:/var/www/html/admin $ sudo mount
/dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=217632k,nr_inodes=54408,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=44388k,mode=700,uid=1000,gid=1000)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=44388k,mode=700,uid=999,gid=996)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

and

pi@raspberrypi:/var/www/html/admin $ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  5.8G  8.2G  42% /
devtmpfs        213M     0  213M   0% /dev
tmpfs           217M     0  217M   0% /dev/shm
tmpfs           217M  8.6M  209M   4% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           217M     0  217M   0% /sys/fs/cgroup
/dev/mmcblk0p1   43M   22M   21M  51% /boot
tmpfs            44M     0   44M   0% /run/user/1000
tmpfs            44M     0   44M   0% /run/user/999

I don't see anything that would explain the behavior. sudo git status still shows as behind by 211 commits?