jupyterlab / jupyterlab-git

A Git extension for JupyterLab
BSD 3-Clause "New" or "Revised" License
1.45k stars 313 forks source link

Git clone or push does not work for repositories requiring authentication #1309

Closed wno-xyt closed 9 months ago

wno-xyt commented 9 months ago

Description

When trying to clone(or push) a repository using jupyterlab-git extension the following message appears:

image

Opening terminal and cloning or pushing the same repo with same user using cmdline works.

Reproduce

  1. Go to 'Git -> Clone a repository'
  2. Select a repository requiring authentication
  3. Provide username and token
  4. See error as per above screenshot

While reporoducing it in container I can see the following stack trace:

Context

Cloning a public repo that does not require authentication works without problems.

Any hints on how to fix this or any workarounds?

welcome[bot] commented 9 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

clabnet commented 9 months ago

Also for me, same issue.

skender18 commented 9 months ago

I got the same issue with python 3.11.6

wno-xyt commented 9 months ago

For the ones using docker image we found a workaround to have working image:

FROM jupyter/scipy-notebook:x86_64-lab-4.0.7

#Your custom stuff for image goes here.

RUN pip install git+https://github.com/pexpect/pexpect.git@master
RUN mamba install --yes \
    'jupyterlab-git==0.50.0' \
    'jupyterlab==4.0.8' && \
    mamba clean --all -f -y && \
    fix-permissions "${CONDA_DIR}" && \
    fix-permissions "/home/${NB_USER}"

With this we have a docker image with working cloning and pushing. Hope this helps.

fcollonval commented 9 months ago

Yes the issue is the one of pexpect: https://github.com/jupyterlab/jupyterlab-git/issues/1261

Closing this one as duplicate.