Can't update due to missing upstream

Expected Behaviour:
Pi-hole updates after running pihole -up command.

Actual Behaviour:
Error message appears and does not update.

Error message:
"Error: Remote revision could not be obtained, please contact Pi-hole Support
Additional debugging output:
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)"

Debug Token:
https://tricorder.pi-hole.net/1RVOLbeK/

Did you do this?

Yes, I got this error message:

fatal: not a git repository (or any of the parent directories): .git

Try the following: pihole checkout master

If it doesn't work, please post the complete output.

I got the error message

 [i] Shortcut "master" detected - checking out master branches...
  [i] Pi-hole core
error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken
error: cannot lock ref 'refs/tags/v5.11': unable to resolve reference 'refs/tags/v5.11': reference broken
error: cannot lock ref 'refs/tags/v5.11.1': unable to resolve reference 'refs/tags/v5.11.1': reference broken
error: cannot lock ref 'refs/tags/v5.11.2': unable to resolve reference 'refs/tags/v5.11.2': reference broken
error: cannot lock ref 'refs/tags/v5.11.3': unable to resolve reference 'refs/tags/v5.11.3': reference broken
  [✗] Unable to pull Core master branch

Eddited response^

Ok. One of the devs will look at this when they wake up.

Okay got it. Thanks.

Can you post the output from

sudo ls -la /etc/.pihole

and

cd /etc/.pihole
sudo git status
``
pi@raspberrypi:~ $ sudo ls -la /etc/.pihole
total 148
drwxr-xr-x   8 root root  4096 Jun 23 23:23  .
drwxr-xr-x 122 root root 12288 Jul  6 18:38  ..
-rw-r--r--   1 root root   779 Jun 23 23:08  .editorconfig
drwxr-xr-x   8 root root  4096 Jul  8 00:00  .git
-rw-r--r--   1 root root   688 Jun 23 23:08  .gitattributes
drwxr-xr-x   3 root root  4096 Jun 23 23:23  .github
-rw-r--r--   1 root root    99 Jun 23 23:08  .gitignore
-rw-r--r--   1 root root    83 Jun 23 23:08  .stickler.yml
-rw-r--r--   1 root root   255 Jun 23 23:08  CONTRIBUTING.md
-rw-r--r--   1 root root 14204 Jun 23 23:08  LICENSE
-rw-r--r--   1 root root  9324 Jun 23 23:23  README.md
drwxr-xr-x   6 root root  4096 Jun 23 23:08  advanced
drwxr-xr-x   2 root root  4096 Jun 23 23:08 'automated install'
-rwxr-xr-x   1 root root 38088 Jun 23 23:08  gravity.sh
drwxr-xr-x   2 root root  4096 Jun 23 23:08  manpages
-rwxr-xr-x   1 root root 17977 Jun 23 23:08  pihole
drwxr-xr-x   2 root root  4096 Jun 23 23:08  test
pi@raspberrypi:~ $ cd /etc/.pihole
sudo git status
``
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

nothing to commit, working tree clean

Okay, something is borked.

Easiest fix.

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

Be careful of the directory names.

That worked. I tried pihole -up afterwards, and it updated without any issues. Thanks!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.