jupyterhub / nbgitpuller

Jupyter server extension to sync a git repository one-way to a local path
https://nbgitpuller.readthedocs.io
BSD 3-Clause "New" or "Revised" License
212 stars 86 forks source link

nbgitpuller generated url failed to open #338

Closed amirayuyue closed 10 months ago

amirayuyue commented 10 months ago

I attempted to utilize nbgitpuller to create a URL for opening the repository on JupyterHub. However, after generating the URL using the browser extension tool, it failed to open the repository correctly on JupyterHub. Instead, it displayed the following error: Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/nbgitpuller/pull.py", line 118, in resolve_default_branch head_branch = subprocess.run( File "/usr/lib/python3.10/subprocess.py", line 526, in run...

Please see the attached figure for more details

nbgitpuller_error
welcome[bot] commented 10 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:

yuvipanda commented 10 months ago

Hi @amirayuyue! Can you show us the full URL that was used?

amirayuyue commented 10 months ago

Hi @yuvipanda here is the url: https://ucmerced.2i2c.cloud/user/yyu49@ucmerced.edu/git-pull?repo=https%3A%2F%2Fgithub.com%2Famirayuyue%2FjupyterHub_test&urlpath=lab%2Ftree%2FjupyterHub_test%2F&redirects=1

yuvipanda commented 10 months ago

@amirayuyue it looks like https://github.com/amirayuyue/jupyterhub_test is not a public repository. By default, nbgitpuller can only pull public repos - it needs extra configuration (via https://github.com/yuvipanda/git-credential-helpers) for it to pull private repos. I don't think that has been set up for the hub you are using.

Can you try it on a public repo?

amirayuyue commented 10 months ago

Hi @yuvipanda got it. Thank you so much for your help! Yes, once I changed it to public repo, everything now works! Thanks again!

yuvipanda commented 10 months ago

@amirayuyue you are welcome :)