"Could not update local repository. Contact support."

I am trying to update an existing install and am running into constant issues. I think it might be a permissions or git branching issue, but I'm not sure.

Expected Behaviour:

when running "pihole -up" command it should update

Actual Behaviour:

when it gets to this step I get an error:
[i] Update repo in /etc/.pihole...
: Could not update local repository. Contact support.

Debug Token:

https://tricorder.pi-hole.net/2ss4a6enyb

You are not on the master branch. Run pihole checkout master

*** [ DIAGNOSING ]: Core version
[✓] Core: 
[i] Remotes: origin	https://github.com/pi-hole/pi-hole.git (fetch)
             origin	https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: HEAD (https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#checkout)
[i] Commit:

In addition, you have locally modified your web branch code and are not running our shipped code:

*** [ DIAGNOSING ]: Web version
[i] Web: v5.4 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/AdminLTE.git (fetch)
             origin	https://github.com/pi-hole/AdminLTE.git (push)
[i] Branch: master
[i] Commit: v5.4-0-g989e1ba0-dirty
[i] Status: A  .gitattributes
            A  .github/ISSUE_TEMPLATE.md
            A  .github/PULL_REQUEST_TEMPLATE.md
            ...

Thank you for the reply! pihole checkout master returns:

pi@raspberrypi:/etc/pihole$ pihole checkout master
/opt/pihole/piholeCheckout.sh: line 13: /etc/.pihole/automated install/basic-install.sh: No such file or directory
/opt/pihole/piholeCheckout.sh: line 51: get_binary_name: command not found
/opt/pihole/piholeCheckout.sh: line 59: is_repo: command not found
Error: Core Pi-hole repo is missing from system!
Please re-run install script from GitHub - pi-hole/pi-hole: A black hole for Internet advertisements

Re-running the install script is how I get the same error in the original post. I'm not sure how I may have modified my web branch code or how that is indicated by the debug output.

Let's go with the nuclear approach to remove this directory and rebuild it clean from github

cd /
sudo rm -rf /etc/.pihole
sudo git clone https://github.com/pi-hole/pi-hole /etc/.pihole

Nice! I had pihole -up stop at /var/www/html/admin and had to go nuclear on that directory as well. But seeing as that directory just contains files for the web interface and no settings/user data that wasn't an issue. Looks like I'm back in the mix :sunglasses: