Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo detection does not work with github enterprise #120

Closed
munkyboy opened this issue Jan 6, 2018 · 3 comments · Fixed by #147
Closed

repo detection does not work with github enterprise #120

munkyboy opened this issue Jan 6, 2018 · 3 comments · Fixed by #147

Comments

@munkyboy
Copy link

munkyboy commented Jan 6, 2018

steps to reproduce:
Given a repo has a remote origin of https://ghe.mycompany.com/proj/repo

  1. do not specify a value for the env var PAGES_REPO_NWO
  2. do not specify a value for the site config repository
  3. set the env var PAGES_GITHUB_HOSTNAME to https://ghe.mycompany.com

running jekyll serve fails with error:

Liquid Exception: 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. in /_layouts/default.html

expected results:
automatic detection of the repo name with owner should support reading from a github enterprise origin. It currently only supports origins of github.com
https://github.com/jekyll/github-metadata/blob/master/lib/jekyll-github-metadata/repository_finder.rb#L68

@benbalter
Copy link
Contributor

benbalter commented Jan 8, 2018

It looks like github.com in

matches = git_remote_url.chomp(".git").match %r!github.com(:|/)([\w-]+)/([\w\.-]+)!
will need to be replaced with Regexp.escape(Jekyll::GitHubMetadata::Pages.github_hostname).

@munkyboy If that's the case, might you be interested in submitting a pull request?

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@mrmanc
Copy link
Contributor

mrmanc commented Aug 9, 2018

@benbalter I could do with the commit hash for cache busting purposes on a GitHub Enterprise instance. Happy to submit a PR for this, but not sure about the automated test side of it. How would you want me to have tested the change?

@jekyllbot jekyllbot removed the stale label Aug 9, 2018
@ashmaroli ashmaroli reopened this Dec 12, 2018
@DirtyF DirtyF pinned this issue Dec 16, 2018
jekyllbot pushed a commit that referenced this issue Jan 2, 2019
@parkr parkr unpinned this issue Jan 2, 2019
@jekyll jekyll locked and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants