Cloning git to Binder Jupyter Lab

I am trying to clone from github to jupyter lab on binder, I clicked install the git extension for binder but am getting a Build Failed error:

Build failed with 504, please run ‘jupyter lab build’ on the server for full output

The process i’m following is here:
https://geo-python-site.readthedocs.io/en/latest/lessons/L2/git-basics.html

Any ideas what the problem may be?

The extension is working and already installed if you go here and click launch binder. Or do you need special stuff from the other site?


I assume you are using the launch binder badge on that page?

Even following the directions from here, I’m not seeing it work although it seems happier this route, without the 504 error:

In the terminal I typed the following as adapting here:

pip install --upgrade jupyterlab jupyterlab-git
jupyter lab build

However, when I refresh the page, it says it failed to load and asks me to run pip install --upgrade jupyterlab jupyterlab-git again and then cycles through doing the same thing.

(I do note that it almost runs out of memory in the build step but acts like it worked anyway.)

The developer is aware and disabled the extension in September 2020, see here where it says “Disabling jupyterlab-git for now as it hangs”. However, they didn’t seem to make that clear in the directions you found.

The extension is working and already installed if you go here and click launch binder . Or do you need special stuff from the other site?

Thanks, that seems to work, however there is no ‘clone repository’ button after I do it that way

  1. Please, don’t spam the forum asking the same question over and over. (this and this.) You want to help people help you. Giving those that volunteer here more to sort is doing the opposite.

  2. Along those lines of helping people help you. Please keep your question focused on what you need to do. Your original post here said you wanted to use the JupyterLab Git extension and asked about the problem of using it. Is that not the goal? (See below if cloning any way possible is the goal.)


After launching from the link I posted, if you look under the ‘Git’ menu up to the right of where the File menu is on the toolbar in the upper left , there is a choice to ‘Clone a Repository’. It is the second one down in the Git menu. However, I see it is grayed out and cannot be selected when I launch via the ‘launch Binder’ badge. I haven’t used this extension before, and so I cannot be sure if it used to work via Binder launches? (It may be a choice for security concerns/incomplete credentials [see below]. It would be an issue to raise directly at that repository if one were needing to understand further.)

However, if you just need to clone a repo into a Binder session for some reason, do this:

  1. Open another browser window and go to the Github repo you want to clone. Click the green ‘Code’ button. Click the copy icon to copy that URL to your clipboard.

  2. Launch a Binder session from your favorite ‘Launch binder’ badge. Once the session, spins up select from the File menu/toolbar > ‘New’ > ‘Terminal’.

  3. In the terminal that opens, type the following:

     git clone
    
  4. Then follow that command with a space and paste into the terminal from the clipboard the URL you copied in step #1. Your command on the terminal should now resemble something like this:

    git clone https://github.com/Geo-Python-2020/Binder.git
    
  5. Hit return. The repo will be cloned to the running session.

However, you are limited by what you can do with git and Binder. If you are looking to work with git fully, you should be using a secure local or remote system where you enter your credentials. Please read:

Alternatively, if you just want the code on any public Github repo to be accessible, you can just point MyBinder at it. As part of what MyBinder does to serve up an active session from a repository, is clone the content for the repository to the session. (Actually, one of the main pieces of tech behind MyBinder, Repo2Docker, is handling that during the building of the image that the session container gets launched from.) Go to MyBinder.org and enter the URL of the repo page at Github (from your browser’s address bar) in the first form entry and press ‘launch’ down to the right. It may take some time if no one has previously launched from this repo as it will need to be built first. Once the session launches, the content from the repo will already be present. Please be advised though that if the repo was not previously configured to work with MyBinder, you probably won’t be able to run all the code without needing to install dependencies. You may want to see here if you need to install those dependencies. Even then you may come across dependencies you cannot install in an already-running session, such as those that require more complex configurations during building of the source image for the session.

1 Like