-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Running Jekyll on a GitHub Pages compatible site (e.g. documentation-theme-jekyll) fails with this error message ** even when there is an origin remote defined **.
Error: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository.
$ git remote -v
origin git@<elided>.com:<elided>/computing-portal.git (fetch)
origin git@<elided>.com:<elided>/computing-portal.git (push)
This happens because around line 103 of metadata_drop.rb this snippet of code tries to match the "url" (it's not a URL, but that's another issue...) against a pattern that's hardwired for the public github.
matches = git_remote_url.chomp(".git").match %r!github.com(:|/)([\w-]+)/([\w\.-]+)!One fix would be to use a library like git-remote-parser and combine it's owner and repo attributes.
If there's an objection pulling in the entire gem, one could either borrow bits (in a way that honor'ed its MIT license) or reimplement them.
Can someone comment on the following?
-
Is there any effort to make this gem more useful GitHub Enterprise customers (in which case this issue could tag along on that effort)?
-
Would a PR with a fix that used git-remote-parser be acceptable?
-
Failing the above, what constraints are there on coding up a fix?
Thanks!