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

Silent error on git error 128 Error: fatal: detected dubious ownership in repository #1391

Open
Sieboldianus opened this issue Feb 6, 2025 · 3 comments
Labels

Comments

@Sieboldianus
Copy link

I already commented here on a closed issue:
#1282 (comment)

Description

@krassowski Using jupyterlab 4.3.4, (jupytext 1.16.6), collaboration-extension 3.1.0, and jupyterlab-git 0.50.2, the issue that was solved in #1285 is back for me:

RTC: is not a Git repository. To use Git, navigate to a local repository, initialize a repository here, or clone an existing repository.

If I install the latest jupyterlab and RTC versions pip install --pre "jupyterlab>=4.4.0a2" "jupyter-collaboration>=4.0.0a0", the RTC tag disappears, but jupyterlab-git is still unable to recognize the git repo. It now says:

You are not currently in a Git repository. To use Git, navigate to a local repository, initialize a repository here, or clone an existing repository.

.. even if I am in a git repo. I guess this has something to do with the new/updated content-providers API or workspaces (?)

Reproduce

  1. Install jupyterlab 4.3.4, (jupytext 1.16.6), collaboration-extension 3.1.0, and jupyterlab-git 0.50.2
  2. Open a folder with a .git folder
  3. See > RTC: is not a Git repository. To use Git, navigate to a local repository, initialize a repository here, or clone an existing repository.

Expected behavior

Git folders are recognized.

@krassowski
Copy link
Member

I cannot reproduce. Can you post a screenshot and logs from the jupyter-server with --debug flag?

@Sieboldianus
Copy link
Author

Hi @krassowski : Many apologies. Just looking at the output with --debug helped to identify the problem:

lbsn-jupyterlab  | [D 2025-02-06 11:36:52.991 ServerApp.jupyterlab_git] Execute ['git', 'rev-parse', '--show-prefix'] in /home/jovyan/work/testrepo.
lbsn-jupyterlab  | [D 2025-02-06 11:36:52.994 ServerApp.jupyterlab_git] Code: 128
lbsn-jupyterlab  |     Output:
lbsn-jupyterlab  |     Error: fatal: detected dubious ownership in repository at '/home/jovyan/work/testrepo'
lbsn-jupyterlab  |     To add an exception for this directory, call:
lbsn-jupyterlab  |
lbsn-jupyterlab  |      git config --global --add safe.directory /home/jovyan/work/testrepo
lbsn-jupyterlab  |
lbsn-jupyterlab  | [E 2025-02-06 11:36:52.994 ServerApp] {
lbsn-jupyterlab  |       "Host": "localhost:8889",
lbsn-jupyterlab  |       "Accept": "*/*",
lbsn-jupyterlab  |       "Referer": "http://localhost:8889/lab/tree/testrepo/notebooks",
lbsn-jupyterlab  |       "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0"
lbsn-jupyterlab  |     }
lbsn-jupyterlab  | [E 2025-02-06 11:36:52.994 ServerApp] 500 POST /git/testrepo/show_prefix?1738841812996 ([email protected]) 3.88ms referer=http://localhost:8889/lab/tree/testrepo/notebooks

After fixing the dubious ownership, everything worked again.

Closed as solved/false lead. Again, apologies - I really appreciate that you took the time looking into this! Thank you for your work.

@krassowski
Copy link
Member

Let's reopen and re-title it. This error should be exposed in UI IMO rather than hidden in debug logs.

@krassowski krassowski reopened this Feb 6, 2025
@krassowski krassowski changed the title Does not work with RTC on JupyterLab 4.3.4 Silent error on git error 128 Error: fatal: detected dubious ownership in repository Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants