Pihole won't update. 'Web Admin repo is missing from system!'

Hello. Today I tried to update my pihole using ‘sudo pihole -up’. However, the following occurred:

[✓] Building dependency package pihole-meta.deb
[✓] Installing Pi-hole dependency package

[i] Checking for updates...
[i] Pi-hole Core:	update available

Error: Web Admin repo is missing from system!
Please re-run install script from https://pi-hole.net

I looked at some forums and tried this command:

sudo git config --global --add safe.directory /var/www/html/admin

but the results were the same. Any way to fix it? Thanks in advance.

Try to nuke the web repo and clone it again using these commands:

sudo rm -rf /var/www/html/admin
sudo git clone https://github.com/pi-hole/web.git /var/www/html/admin

After that, try to updated again.

That did the trick! Thank you very much!