Skip to content

fails to cache credentials, no socket created #1369

Open
@itcarroll

Description

@itcarroll

Description

I can't get the extension to temporarily cache credentials with the git credential helper.

Reproduce

  1. Go to the jupyter lab file browser
  2. Click on the git-clone button
  3. Enter HTTPS URL for repo
  4. Enter username, PAT, check (or don't, doesn't matter) the temporary store credentials box
  5. Successful clone, yay!
  6. Delete folder just created
  7. Click on the git-clone button
  8. Enter the same HTTPS URL for repo
  9. Enter username, PAT, ... hey wait, this isn't supposed to happen again!

Expected behavior

I expect git to create /tmp/.git-credential-cache/socket and reuse it. What actually happens is that the folder /tmp/.git-credential-cache/ gets created, but no socket. In the terminal, if I execute git clone ... and provide credentials, the socket is created and the jupyterlab-git extension no longer prompts for credentials on subsequent pull.

Context

  • Python package version: jupyterlab-git==0.50.1
  • Extension version: @jupyterlab/git v0.50.1 enabled OK (python, jupyterlab-git)
  • Git version: git version 2.34.1
  • Operating System and its version: Ubuntu 22.04.5 LTS
Command Line Output
[D 2024-10-28 05:25:46.642 ServerApp.jupyterlab_git] Execute ['git', 'config', '--list'] in /home/jovyan/.
[D 2024-10-28 05:25:46.652 ServerApp.jupyterlab_git] Code: 0
    Output: credential.helper=cache --timeout=36000 --socket /tmp/.git-credential-cache/socket
Error: 

[D 2024-10-28 05:25:46.659 ServerApp.jupyterlab_git] A credential cache daemon has been spawned with PID 170
[D 2024-10-28 05:25:46.660 ServerApp.jupyterlab_git] Execute ['git', 'clone', '--recurse-submodules', 'https://git.smce.nasa.gov/icarroll/test-jlab-git.git', '-q'] in /home/jovyan/.
ok

Web Browser Output
POST http://127.0.0.1:8889/git/clone?1730130348411 500 (Internal Server Error)
n @ jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1
n @ jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1
Ne @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
(anonymous) @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
execute @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
clone @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
cs @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
execute @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
await in execute
execute @ jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1
onClick @ 789.270919a0cb6c3ffb4b8c.js?v=270919a0cb6c3ffb4b8c:1
o @ jlab_core.23e8a6b191d1fa15c1b7.js?v=23e8a6b191d1fa15c1b7:1
Ue @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
Qe @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
je @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
al @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
ul @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
(anonymous) @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
Os @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
De @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
dl @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
lt @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2
tt @ 3935.905285b8e22c337968ed.js?v=905285b8e22c337968ed:2

But I think that's normal? It's the "Cloning into 'test-jlab-git'...\nfatal: could not read Username for 'https://git.smce.nasa.gov': terminal prompts disabled" error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions