Skip to content
This repository was archived by the owner on Aug 19, 2020. It is now read-only.
This repository was archived by the owner on Aug 19, 2020. It is now read-only.

Running into issues w/ the git extension #88

@polarizeme

Description

@polarizeme

Hiya.

I'll start this off by saying we're not using Docker for this project and we are using Jupyterhub so it's very possible those differences are the root of all this. Oh, and I do have gitpython installed w/ pip. That said...

So I'm trying to implement the use of git-commit-push on a jupyterhub server and running into some issues I'm hoping you can comment on.

I was running into an issue on line 24 of git-commit-push.js where, upon writing a commit message and hitting the "commit and push" button, I'm met with the following message in the dev console:
github-commit-push.js?v=20160425184637:24
Uncaught TypeError: Cannot read property '1' of null

So taking a look at line 24 of the .js file, I see:
var filepath = window.location.pathname.match(re)[1];

And the regex above that in line 23 reads:
var re = /^\/notebooks(.*?)$/;

Sure enough, running window.location.pathname.match(/^\/notebooks(.*?)$/) returns "null."

Since running window.location.pathname returns the proper path to the notebook ("/user/[username]/notebooks/[filename].ipynb"), I assumed something must be up with the regex. Again, sure enough, using
window.location.pathname.match(/\/notebooks\/(.*)$/)[1]
returns "[filename].ipynb" as intended.

Unfortunately, solving that resulted in the following error on a new attempt to commit:
github-commit-push.js?v=20160426122528:70
PUT https://[server]/git/commit 405 (Method Not Allowed)
and this is where I'm stumped. I'm not sure what/why this is trying to do with that url on my jupyter[hub] server. My guess is that this is simply relevant to your use of Docker and it's boned on my end because we're not using it, so there are differences in where AJAX calls are meant to be sent.

I know next to nothing about javascript or ajax, let alone your docker environments, so I'm hoping you can chime in with your thoughts on what could be going on.

Sorry this is so long-winded. Ha. Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions