nabaztag2018/pynab

Cannot get HEAD - not a git repository?

Opened this issue · 5 comments

Hi,

I've made this to try to fix this error : "Cannot get number of commits from upstream. Not connected to the internet?"

Nabaztag@Nabaztag:/var/www/html $ sudo apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-cvs git-mediawiki git-svn
The following packages will be upgraded:
git
1 upgraded, 0 newly installed, 0 to remove and 164 not upgraded.
Need to get 4,187 kB of archives.
After this operation, 51.2 kB of additional disk space will be used.
Get:1 http://mirrors.ircam.fr/pub/raspbian/raspbian buster/main armhf git armhf 1:2.20.1-2+deb10u8 [4,187 kB]
Fetched 4,187 kB in 9s (461 kB/s)
Reading changelogs... Done
(Reading database ... 101395 files and directories currently installed.)
Preparing to unpack .../git_1%3a2.20.1-2+deb10u8_armhf.deb ...
Unpacking git (1:2.20.1-2+deb10u8) over (1:2.20.1-2+deb10u4) ...
Setting up git (1:2.20.1-2+deb10u8) ...

And now, i've this error on full lines : "Cannot get HEAD - not a git repository?"

and this :

Nabaztag@Nabaztag:~ $ sudo git init
Initialized empty Git repository in /home/Nabaztag/.git/
Nabaztag@Nabaztag:~ $ cd /home/Nabaztag/
Nabaztag@Nabaztag:~ $ ls -laf
.bash_history .gnupg . .git .profile .bashrc .. .bash_logout
Nabaztag@Nabaztag:~ $ cd .git
Nabaztag@Nabaztag:~/.git $ ls
branches config description HEAD hooks info objects refs

How to fix this ?
Thanks...

May be this help :

Nabaztag@Nabaztag:~ $ sudo service nabweb status
● nabweb.service - Nabaztag web server
Loaded: loaded (/lib/systemd/system/nabweb.service; enabled; vendor preset: e
Active: active (running) since Tue 2024-06-11 10:21:16 CEST; 8min ago
Main PID: 581 (gunicorn)
Tasks: 3 (limit: 991)
CGroup: /system.slice/nabweb.service
├─581 /opt/pynab/venv/bin/python3.7 /opt/pynab/venv/bin/gunicorn --ti
└─725 /opt/pynab/venv/bin/python3.7 /opt/pynab/venv/bin/gunicorn --ti

Jun 11 10:25:19 Nabaztag gunicorn[581]: git config --global --add safe.d
Jun 11 10:25:20 Nabaztag gunicorn[581]: fatal: detected dubious ownership in rep
Jun 11 10:25:20 Nabaztag gunicorn[581]: To add an exception for this directory,
Jun 11 10:25:20 Nabaztag gunicorn[581]: git config --global --add safe.d
Jun 11 10:25:20 Nabaztag gunicorn[581]: fatal: detected dubious ownership in rep
Jun 11 10:25:20 Nabaztag gunicorn[581]: To add an exception for this directory,
Jun 11 10:25:20 Nabaztag gunicorn[581]: git config --global --add safe.d
Jun 11 10:25:20 Nabaztag gunicorn[581]: fatal: detected dubious ownership in rep
Jun 11 10:25:20 Nabaztag gunicorn[581]: To add an exception for this directory,
Jun 11 10:25:20 Nabaztag gunicorn[581]: git config --global --add safe.d
Nabaztag@Nabaztag:~ $

Nabaztag@Nabaztag:~/.git $ cat HEAD
ref: refs/heads/master

Please have a look at discussion #476, which covers the "Cannot get HEAD - not a git repository?" issue.

This issue is fixed by PR #451.

I've tried #451 and the problem is still here...