nbgitpuller: ValueError: Problem accessing HEAD branch

Hi! After updating my images today, nbgitpuller started to throw this error when starting from an url which worked previously.

Here is the url (generated with the generator) and the error message:

https://mybinder.org/v2/gh/OGGM/binder/stable?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252FOGGM%252Ftutorials%26urlpath%3Dlab%252Ftree%252Ftutorials%252F%26branch%3Dstable

Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbgitpuller/pull.py", line 120, in resolve_default_branch
    head_branch = subprocess.run(
File "/srv/conda/envs/notebook/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'ls-remote', '--symref', '--', 'https://github.com/OGGM/tutorials', 'HEAD']' returned non-zero exit status 128.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbgitpuller/handlers.py", line 76, in get
    gp = GitPuller(repo, repo_dir, branch=branch, depth=depth, parent=self.settings['nbapp'])
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbgitpuller/pull.py", line 76, in __init__
    self.branch_name = self.resolve_default_branch()
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/nbgitpuller/pull.py", line 136, in resolve_default_branch
    raise ValueError(m)
ValueError: Problem accessing HEAD branch: https://github.com/OGGM/tutorials

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

Do you know what version of nbgitpuller you had before?

I was using a tagged image from 2021 05 16

You can still open it on binder with:

https://mybinder.org/v2/gh/OGGM/binder/5959f23f1cdcff95384bbe0897b8290150969b2f

In this image, the git ls-remote --symref -- https://github.com/OGGM/tutorials HEAD returns properly. (i.e. nothing to do with gitpuller).