Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get HEAD - not a git repository? #479

Open
Madcat-76310 opened this issue Jun 11, 2024 · 5 comments
Open

Cannot get HEAD - not a git repository? #479

Madcat-76310 opened this issue Jun 11, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Madcat-76310
Copy link

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...

@Madcat-76310 Madcat-76310 added the bug Something isn't working label Jun 11, 2024
@Madcat-76310
Copy link
Author

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:~ $

@Madcat-76310
Copy link
Author

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

@f-laurens
Copy link
Contributor

f-laurens commented Jun 11, 2024

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.

@Madcat-76310
Copy link
Author

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

@f-laurens
Copy link
Contributor

What do you mean by "tried #451"?
See https://www.tagtagtag.fr/forum/showthread.php?tid=491&pid=2726#pid2726.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants