While trying to install Pi Hole I got the following error, "Could not update local repository. Contact support"

I have looked at other forums to no success. Any help is appreciated.

EXPECTED BEHAVIOR
Pihole should install

ACTUAL BEHAVIOR
Install ends with error "Could not update local repository. Contact"

I have looked at a few things from reddit and this website and I am not sure what I am doing wrong. Thanks again

Please post the entire output of the following command (copy and paste into a reply please, not with a picture of a screen showing the text).

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

hi, it seems i cannot reply to you with the whole post

+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php8.2-sqlite3 == \p\h\p* ]]
+ [[ php8.2-sqlite3 != *\-\c\o\m\m\o\n ]]
+ [[ php8.2-sqlite3 != *\-\c\g\i ]]
+ php_modules+=' sqlite3'
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php8.2-xml == \p\h\p* ]]
+ [[ php8.2-xml != *\-\c\o\m\m\o\n ]]
+ [[ php8.2-xml != *\-\c\g\i ]]
+ php_modules+=' xml'
+ for i in "${PIHOLE_WEB_DEPS[@]}"
+ [[ php8.2-intl == \p\h\p* ]]
+ [[ php8.2-intl != *\-\c\o\m\m\o\n ]]
+ [[ php8.2-intl != *\-\c\g\i ]]
+ php_modules+=' intl'
+ dialog --no-shadow --keep-tite --backtitle 'Pi-hole Installation' --title 'Web Server' --yesno '\n\nA web server is required for the Admin Web Interface.\n\nDo you want to install lighttpd and the required PHP modules?\n\nNB: If you disable this, and, do not have an existing web server and required PHP modules (sqlite3 xml intl) installed, the web interface will not function. Additionally the web server user needs to be member of the "pihole" group for full functionality.' 20 70
+ result=0
+ case ${result} in
+ printf '  %b Installing lighttpd\n' '[i]'
  [i] Installing lighttpd
+ INSTALL_WEB_SERVER=true
+ setLogging
+ dialog --no-shadow --keep-tite --backtitle 'Pihole Installation' --title 'Enable Logging' --yesno '\n\nWould you like to enable query logging?' 20 70
+ result=0
+ case ${result} in
+ printf '  %b Query Logging on.\n' '[i]'
  [i] Query Logging on.
+ QUERY_LOGGING=true
+ setPrivacyLevel
++ dialog --no-shadow --keep-tite --output-fd 1 --cancel-label Exit --ok-label Continue --radiolist 'Select a privacy mode for FTL. https://docs.pi-hole.net/ftldns/privacylevels/' 20 70 6 0 'Show everything' on 1 'Hide domains' off 2 'Hide domains and clients' off 3 'Anonymous mode' off
+ PRIVACY_LEVEL=0
+ result=0
+ case ${result} in
+ printf '  %b Using privacy level: %s\n' '[i]' 0
  [i] Using privacy level: 0
+ clone_or_update_repos
+ [[ false == true ]]
+ getGitFiles /etc/.pihole https://github.com/pi-hole/pi-hole.git
+ local directory=/etc/.pihole
+ local remoteRepo=https://github.com/pi-hole/pi-hole.git
+ local 'str=Check for existing repository in /etc/.pihole'
+ printf '  %b %s...' '[i]' 'Check for existing repository in /etc/.pihole'
  [i] Check for existing repository in /etc/.pihole...+ is_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local rc
+ [[ -d /etc/.pihole ]]
+ pushd /etc/.pihole
+ git status --short
+ popd
+ return 0
+ printf '%b  %b %s\n' '\r\033[K' '[\e[1;32m✓\e[0m]' 'Check for existing repository in /etc/.pihole'
  [✓] Check for existing repository in /etc/.pihole
+ update_repo /etc/.pihole
+ local directory=/etc/.pihole
+ local curBranch
+ local 'str=Update repo in /etc/.pihole'
+ pushd /etc/.pihole
+ printf '  %b %s...' '[i]' 'Update repo in /etc/.pihole'
  [i] Update repo in /etc/.pihole...+ git stash --all --quiet
+ true
+ git clean --quiet --force -d
+ git pull --no-rebase --quiet
+ return 1
+ printf '\n  %b: Could not update local repository. Contact support.%b\n' '\e[1;31m' '\e[0m'

  : Could not update local repository. Contact support.
+ exit 1
anthony@pihole3:~ $ ^C
anthony@pihole3:~ $ + ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName='OpenDNS (ECS, DNSSEC)'
+ DNSChooseOptions[DNSServerCount]='OpenDNS (ECS, DNSSEC)'
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Level3
+ DNSChooseOptions[DNSServerCount]=Level3
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ DNSName=Comodo
+ DNSChooseOptions[DNSServerCount]=Comodo
+ ((  DNSServerCount=DNSServerCount+1  ))
+ DNSChooseOptions[DNSServerCount]=
+ ((  DNSServerCount=DNSServerCount+1  ))
+ for DNSServer in ${DNS_SERVERS}
++ cut '-d;' -f1
+ exit 1d not update local repository. Contact support.ntact support.%b\n' '\e[1

I could not put the whole output because im a new user and cannot put links but this is the ending of the code

You can post the code inside "fences" (```), like this:

```
Paste your code here.
The code can contain links and @ characters
```

What is the output of:

cd /etc/.pihole
sudo git status

the output is:

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   .codespellignore
        new file:   .editorconfig
        new file:   .gitattributes
        new file:   .github/dco.yml
        new file:   .github/dependabot.yml
        new file:   .github/release.yml
        new file:   .github/workflows/codeql-analysis.yml
        new file:   .github/workflows/merge-conflict.yml
        new file:   .github/workflows/stale.yml
        new file:   .github/workflows/stale_pr.yml
        new file:   .github/workflows/sync-back-to-dev.yml
        new file:   .github/workflows/test.yml
        new file:   .gitignore
        new file:   .stickler.yml
        new file:   .yamllint.conf
        new file:   CONTRIBUTING.md
        new file:   LICENSE
        new file:   README.md
        new file:   advanced/01-pihole.conf
        new file:   advanced/06-rfc6761.conf
        new file:   advanced/Scripts/COL_TABLE
        new file:   advanced/Scripts/chronometer.sh
        new file:   advanced/Scripts/database_migration/gravity-db.sh
        new file:   advanced/Scripts/database_migration/gravity/10_to_11.sql
        new file:   advanced/Scripts/database_migration/gravity/11_to_12.sql
        new file:   advanced/Scripts/database_migration/gravity/12_to_13.sql
        new file:   advanced/Scripts/database_migration/gravity/13_to_14.sql
        new file:   advanced/Scripts/database_migration/gravity/14_to_15.sql
        new file:   advanced/Scripts/database_migration/gravity/1_to_2.sql
        new file:   advanced/Scripts/database_migration/gravity/2_to_3.sql
        new file:   advanced/Scripts/database_migration/gravity/3_to_4.sql
        new file:   advanced/Scripts/database_migration/gravity/4_to_5.sql
        new file:   advanced/Scripts/database_migration/gravity/5_to_6.sql
        new file:   advanced/Scripts/database_migration/gravity/6_to_7.sql
        new file:   advanced/Scripts/database_migration/gravity/7_to_8.sql
        new file:   advanced/Scripts/database_migration/gravity/8_to_9.sql
        new file:   advanced/Scripts/database_migration/gravity/9_to_10.sql
        new file:   advanced/Scripts/list.sh
        new file:   advanced/Scripts/pihole-reenable.sh
        new file:   advanced/Scripts/piholeARPTable.sh
        new file:   advanced/Scripts/piholeCheckout.sh
        new file:   advanced/Scripts/piholeDebug.sh
        new file:   advanced/Scripts/piholeLogFlush.sh
        new file:   advanced/Scripts/query.sh
        new file:   advanced/Scripts/update.sh
        new file:   advanced/Scripts/updatecheck.sh
        new file:   advanced/Scripts/utils.sh
        new file:   advanced/Scripts/version.sh
        new file:   advanced/Scripts/webpage.sh
        new file:   advanced/Templates/gravity.db.sql
        new file:   advanced/Templates/gravity_copy.sql
        new file:   advanced/Templates/logrotate
        new file:   advanced/Templates/pihole-FTL-poststop.sh
        new file:   advanced/Templates/pihole-FTL-prestart.sh
        new file:   advanced/Templates/pihole-FTL.conf
        new file:   advanced/Templates/pihole-FTL.service
        new file:   advanced/Templates/pihole-FTL.systemd
        new file:   advanced/Templates/pihole.cron
        new file:   advanced/Templates/pihole.sudo
        new file:   advanced/bash-completion/pihole
        new file:   advanced/dnsmasq.conf.original
        new file:   advanced/lighttpd.conf.debian
        new file:   advanced/lighttpd.conf.fedora
        new file:   advanced/pihole-admin.conf
        new file:   automated install/basic-install.sh
        new file:   automated install/uninstall.sh
        new file:   gravity.sh
        new file:   manpages/pihole-FTL.8
        new file:   manpages/pihole.8
        new file:   pihole
        new file:   test/README.md
        new file:   test/__init__.py
        new file:   test/_centos_9.Dockerfile
        new file:   test/_debian_10.Dockerfile
        new file:   test/_debian_11.Dockerfile
        new file:   test/_debian_12.Dockerfile
        new file:   test/_fedora_39.Dockerfile
        new file:   test/_fedora_40.Dockerfile
        new file:   test/_ubuntu_20.Dockerfile
        new file:   test/_ubuntu_22.Dockerfile
        new file:   test/_ubuntu_23.Dockerfile
        new file:   test/_ubuntu_24.Dockerfile
        new file:   test/conftest.py
        new file:   test/requirements.txt
        new file:   test/setup.py
        new file:   test/test_any_automated_install.py
        new file:   test/test_any_utils.py
        new file:   test/test_centos_common_support.py
        new file:   test/test_centos_fedora_common_support.py
        new file:   test/test_fedora_support.py
        new file:   test/tox.centos_9.ini
        new file:   test/tox.debian_10.ini
        new file:   test/tox.debian_11.ini
        new file:   test/tox.debian_12.ini
        new file:   test/tox.fedora_39.ini
        new file:   test/tox.fedora_40.ini
        new file:   test/tox.ubuntu_20.ini
        new file:   test/tox.ubuntu_22.ini
        new file:   test/tox.ubuntu_23.ini
        new file:   test/tox.ubuntu_24.ini

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   .codespellignore
        modified:   .editorconfig
        modified:   .gitattributes
        modified:   .github/dco.yml
        modified:   .github/dependabot.yml
        modified:   .github/release.yml
        modified:   .github/workflows/codeql-analysis.yml
        modified:   .github/workflows/merge-conflict.yml
        modified:   .github/workflows/stale.yml
        modified:   .github/workflows/stale_pr.yml
        modified:   .github/workflows/sync-back-to-dev.yml
        modified:   .github/workflows/test.yml
        modified:   .gitignore
        modified:   .stickler.yml
        modified:   .yamllint.conf
        modified:   CONTRIBUTING.md
        modified:   LICENSE
        modified:   README.md
        modified:   advanced/01-pihole.conf
        modified:   advanced/06-rfc6761.conf
        modified:   advanced/Scripts/COL_TABLE
        modified:   advanced/Scripts/chronometer.sh
        modified:   advanced/Scripts/database_migration/gravity-db.sh
        modified:   advanced/Scripts/database_migration/gravity/10_to_11.sql
        modified:   advanced/Scripts/database_migration/gravity/11_to_12.sql
        modified:   advanced/Scripts/database_migration/gravity/12_to_13.sql
        modified:   advanced/Scripts/database_migration/gravity/13_to_14.sql
        modified:   advanced/Scripts/database_migration/gravity/14_to_15.sql
        modified:   advanced/Scripts/database_migration/gravity/1_to_2.sql
        modified:   advanced/Scripts/database_migration/gravity/2_to_3.sql
        modified:   advanced/Scripts/database_migration/gravity/3_to_4.sql
        modified:   advanced/Scripts/database_migration/gravity/4_to_5.sql
        modified:   advanced/Scripts/database_migration/gravity/5_to_6.sql
        modified:   advanced/Scripts/database_migration/gravity/6_to_7.sql
        modified:   advanced/Scripts/database_migration/gravity/7_to_8.sql
        modified:   advanced/Scripts/database_migration/gravity/8_to_9.sql
        modified:   advanced/Scripts/database_migration/gravity/9_to_10.sql
        modified:   advanced/Scripts/list.sh
        modified:   advanced/Scripts/pihole-reenable.sh
        modified:   advanced/Scripts/piholeARPTable.sh
        modified:   advanced/Scripts/piholeCheckout.sh
        modified:   advanced/Scripts/piholeDebug.sh
        modified:   advanced/Scripts/piholeLogFlush.sh
        modified:   advanced/Scripts/query.sh
        modified:   advanced/Scripts/update.sh
        modified:   advanced/Scripts/updatecheck.sh
        modified:   advanced/Scripts/utils.sh
        modified:   advanced/Scripts/version.sh
        modified:   advanced/Scripts/webpage.sh
        modified:   advanced/Templates/gravity.db.sql
        modified:   advanced/Templates/gravity_copy.sql
        modified:   advanced/Templates/logrotate
        modified:   advanced/Templates/pihole-FTL-poststop.sh
        modified:   advanced/Templates/pihole-FTL-prestart.sh
        modified:   advanced/Templates/pihole-FTL.conf
        modified:   advanced/Templates/pihole-FTL.service
        modified:   advanced/Templates/pihole-FTL.systemd
        modified:   advanced/Templates/pihole.cron
        modified:   advanced/Templates/pihole.sudo
        modified:   advanced/bash-completion/pihole
        modified:   advanced/dnsmasq.conf.original
        modified:   advanced/lighttpd.conf.debian
        modified:   advanced/lighttpd.conf.fedora
        modified:   advanced/pihole-admin.conf
        modified:   automated install/basic-install.sh
        modified:   automated install/uninstall.sh
        modified:   gravity.sh
        modified:   manpages/pihole-FTL.8
        modified:   manpages/pihole.8
        modified:   pihole
        modified:   test/README.md
        modified:   test/_centos_9.Dockerfile
        modified:   test/_debian_10.Dockerfile
        modified:   test/_debian_11.Dockerfile
        modified:   test/_debian_12.Dockerfile
        modified:   test/_fedora_39.Dockerfile
        modified:   test/_fedora_40.Dockerfile
        modified:   test/_ubuntu_20.Dockerfile
        modified:   test/_ubuntu_22.Dockerfile
        modified:   test/_ubuntu_23.Dockerfile
        modified:   test/_ubuntu_24.Dockerfile
        modified:   test/conftest.py
        modified:   test/requirements.txt
        modified:   test/setup.py
        modified:   test/test_any_automated_install.py
        modified:   test/test_any_utils.py
        modified:   test/test_centos_common_support.py
        modified:   test/test_centos_fedora_common_support.py
        modified:   test/test_fedora_support.py
        modified:   test/tox.centos_9.ini
        modified:   test/tox.debian_10.ini
        modified:   test/tox.debian_11.ini
        modified:   test/tox.debian_12.ini
        modified:   test/tox.fedora_39.ini
        modified:   test/tox.fedora_40.ini
        modified:   test/tox.ubuntu_20.ini
        modified:   test/tox.ubuntu_22.ini
        modified:   test/tox.ubuntu_23.ini
        modified:   test/tox.ubuntu_24.ini

Apparently the initial attempt to install Pi-hole failed, leaving some files (and maybe some incomplete files) behind.

Since you are trying to install Pi-hole (not update), execute these commands to remove any leftover from the failed installation attempt, to make sure you are starting from zero:

cd /
sudo rm -rf /var/www/html/admin
sudo rm -rf /etc/.pihole

Then, try to install Pi-hole again.

Strange that git status does not show any branches or code. It's almost like it's a bare repository that only ran git init and that's not part of the installation process. There are changes that are staged which requires git add to be run and that also is not part of our install process.

If you haven't rm'd the directories it would be nice to see what sudo git remote -v shows.

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