Error when updating manually

root@raspberrypi:/etc/.pihole# git fetch origin
error: unable to resolve reference refs/tags/V2.9.2: Invalid argument
From GitHub - pi-hole/pi-hole: A black hole for Internet advertisements
! [new tag] V2.9.2 -> V2.9.2 (unable to update local ref)
error: unable to resolve reference refs/tags/v2.1: Invalid argument
! [new tag] v2.1 -> v2.1 (unable to update local ref)

WELL DONE GUYS!!! I am so happy that i decided to make pihole my primary DNS in my network... :stuck_out_tongue:

I moved your post to a new topic. Something screwed up your git repository somehow.

Try

git gc --prune=now
git remote prune origin

in your /etc/.pihole directory

Thanks for the quick reply. I've tried your suggestions and this is what I get:

root@raspberrypi:/etc/.pihole# git gc --prune=now
Counting objects: 6689, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2659/2659), done.
Writing objects: 100% (6689/6689), done.
Total 6689 (delta 3988), reused 6598 (delta 3953)
root@raspberrypi:/etc/.pihole# git remote prune origin
root@raspberrypi:/etc/.pihole# git fetch origin
error: unable to resolve reference refs/tags/V2.9.2: Invalid argument
From GitHub - pi-hole/pi-hole: A black hole for Internet advertisements
! [new tag] V2.9.2 -> V2.9.2 (unable to update local ref)
error: unable to resolve reference refs/tags/v2.1: Invalid argument
! [new tag] v2.1 -> v2.1 (unable to update local ref)

Something bad happened to your repo, we have seen this before and chances are high that this is related to write errors on pulling power from the Raspberry while there is some I/O pending (which sometimes just hangs around and never seems to finish for some unknown reason).

It will be best for you to start over and clone the repos again. Your settings will be preserved

sudo -s
cd /root

rm -rf /etc/.pihole
git clone -q --depth 1 https://github.com/pi-hole/pi-hole.git /etc/.pihole

rm -rf /var/www/html/admin
git clone -q --depth 1 https://github.com/pi-hole/adminLTE.git /var/www/html/admin

pihole -r

After the last step, choose the Repair option, and you should be back on track

I've deleted .pihole and used the curl script with update option selected. This worked. Calling pihole -up afterwards results in the message all is up to date.

Thanks for the support.

:slight_smile:

Okay, that essentially did the same for the .pihole repository. Wans't sure if it maybe also affected your adminLTE repo, but glad that is working for you now!

1 Like