Update Error

Expected Behaviour:

I am trying to run a pihole -up update as the system was telling me there was a update. I do not remember the version numbers.

Actual Behaviour:

This is the version numbers I am getting now
Pi-hole version is v5.17.3 (Latest: v5.17.3)
web version is be05b0f6 (Latest: v5.21)
FTL version is v5.25.1 (Latest: v5.25.1)
As you see the web version is hex
when running a pihole -up

[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.31-1~deb10u5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Checking for updates...
[i] Pi-hole Core: up to date
fatal: No tags can describe 'be05b0f61d3fcf796dae4cc3f89f8540b2359325'.
Try --always, or create some tags.
fatal: No tags can describe 'be05b0f61d3fcf796dae4cc3f89f8540b2359325'.
Try --always, or create some tags.

Error: Local revision could not be obtained, please contact Pi-hole Support
Additional debugging output:
On branch master
nothing to commit, working tree clean

Debug Token:

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

I had a similar issue a while ago,
the Web branch seems to be different
are you using a docker container or anything other than a barebone platform?

This helped for me
pihole checkout master

There is also a closed issue that might shed some light

No I am not using a docker.
just the barebone pi with pihole and pivpn installed
I did have speedtest install, but no longer.

So I have run the pihole checkout master
This is where the error happened

pi@PiHole-PiVPN:~ $ 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.
[i] Running installer to upgrade your installation

[✓] Root user check

[i] SELinux not detected
[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.31-1~deb10u5

[✓] Checking apt-get for upgraded packages... up to date!

[i] Checking for / installing Required dependencies for OS Check...
[✓] Checking for grep
[✓] Checking for dnsutils

[✓] Supported OS detected
[i] Checking for / installing Required dependencies for this install script...
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Performing unattended setup, no dialogs will be displayed
[✓] Check for existing repository in /etc/.pihole
[i] Update repo in /etc/.pihole...HEAD is now at 19bfa08b Pi-hole core v5.17.3 (#5520)
[✓] Update repo in /etc/.pihole

[✓] Check for existing repository in /var/www/html/admin
[i] Update repo in /var/www/html/admin...fatal: No tags can describe 'be05b0f61d3fcf796dae4cc3f89f8540b2359325'.
Try --always, or create some tags.
fatal: ambiguous argument '': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

: Could not update local repository. Contact support.
Error: Unable to complete update, please contact support
pi@PiHole-PiVPN:~ $

What is the output from:

cd /var/www/html/admin
sudo git status

This is what I get

pi@PiHole-PiVPN:~ $ cd /var/www/html/admin
pi@PiHole-PiVPN:/var/www/html/admin $ sudo git status
On branch master
nothing to commit, working tree clean
pi@PiHole-PiVPN:/var/www/html/admin $

Easiest and quickest resolution is to delete that directory and do a repair.

sudo rm -r /var/www/html/admin
pihole -r 

did not work got this error..

pi@PiHole-PiVPN:/ $ pihole -r

[✓] Root user check

[i] SELinux not detected
[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.3.31-1~deb10u5

[✓] Checking apt-get for upgraded packages... up to date!

[i] Checking for / installing Required dependencies for OS Check...
[✓] Checking for grep
[✓] Checking for dnsutils

[✓] Supported OS detected
[i] Checking for / installing Required dependencies for this install script...
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for dialog
[✓] Checking for ca-certificates

[i] Repair option selected
[i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
Unable to reset /var/www/html/admin, exiting installer
pi@PiHole-PiVPN:/ $

Reinstall instead of repair.

Sorry what common do I use ?
How about my setting?

pihole -r and tell it to do the reinstall instead of repair. Your settings will all be there, you can do a transporter backup of your settings if you want to be sure and safe.

You could do a git clone of the web interface repository in to that directory but you have to be sure you are using the correct user account for the permissions to be all correct. It's easier to do the reinstall option.

I do have a backup using the teleporter.
using the pihole -r
This only give me a repair or reconfigure option! Do I use the reconfigure option?

Yes, sorry reconfigure is the option to select.

I am still getting the

Unable to reset /var/www/html/admin, exiting installer

using the reconfigure option
could I use :-

curl -sSL https://install.pi-hole.net | bash

Or can you give me the common to use the git clone

What is the output from sudo ls -la /var/www/html? Is the /admin directory still there and just empty?

total 28
drwxrwxr-x 5 www-data www-data 4096 Mar 25 21:56 .
drwxr-xr-x 3 root root 4096 May 25 2021 ..
drwxr-xr-x 7 root root 4096 Jan 16 2023 admin_bak
-rw-r--r-- 1 www-data www-data 13 Mar 14 17:41 custom_disable_timer
-rw-r--r-- 1 root root 3388 May 25 2021 index.lighttpd.orig
drwxr-xr-x 7 root root 4096 Jul 16 2023 org_admin
drwxr-xr-x 2 root root 4096 Dec 2 2022 pihole

Looks like the admin Directory is missing
The sudo rm -r /var/www/html/admin command delete it

There shouldn't be a pihole or an admin_bak directory there. Have you done any customizations or changes to things? custom_disable_timer looks like it's a config file that shouldn't be in the html directory either?

Since the directory is missing you should try to do the Repair again via pihole -r.

I did have speedtest install, but no longer.
Am I trying a repair or reconfigure option?

Repair.

still getting the
Unable to reset /var/www/html/admin, exiting installer
Error