gpt4 book ai didi

github - Jekyll 与 GitHub Enterprise

转载 作者:行者123 更新时间:2023-12-02 02:57:44 25 4
gpt4 key购买 nike

我正在按照本指南开始使用 Jekyll:Setting up your GitHub Pages site locally with Jekyll ,但我是针对 GitHub Enterprise 执行此操作。我的存储库位于 https://github.company.com/myorg/myrepo,GitHub Pages 由 https://pages.github.company.com/myorg/myrepo< 提供(或https://github.company.com/pages/myorg/myrepo)。

步骤 bundle exec jekyll new 。 --force 在教程中创建了一个简单的模板站点,我修改了 _config.yml 以包含以下内容:

baseurl: ""
url: "https://pages.github.company.com/myorg/myrepo"
repository: "myorg/myrepo"

但是在我运行 bundle exec jekyllserve 后,我看到它发布到了公共(public) GitHub:

Generating...
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/pages: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/contributors?per_page=100: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/orgs/myorg: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/users/myorg/repos?per_page=100&type=public: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/releases?per_page=100: 404 - Not Found // See: https://developer.github.com/v3

看看这个:Repository metadata on GitHub Pages ,我想我可以覆盖 _config.yml 中的一些 GitHub 元数据设置以指向 GitHub Enterprise,因此我添加了以下内容:

github:
hostname: github.company.com
pages_hostname: pages.github.company.com
api_url: https://api.github.company.com
repository_url: https://github.company.com/myrepo/myorg

但它不会改变任何东西,它仍然会发布到公共(public) GitHub API。

看看这个:github-metadata ,我尝试重写 API:

$ PAGES_API_URL="https://api.github.company.com" bundle exec jekyll serve

但是也没有用。

该网站实际上是“构建”的,但如果我访问 https://127.0.0.1:4000/ ,其中的网站标题链接会将我带到 http://github .com/pages/myorg/myrepo/。如何才能真正使用 GitHub Enterprise?

最佳答案

我认为这就是您正在寻找的:https://help.github.com/enterprise/2.9/user/articles/user-organization-and-project-pages/#project-pages当然,请确保正确选择您的 GitHub Enterprise 版本。

http(s)://[hostname]/pages/<orgname>/<projectname>/, or http(s)://pages.[hostname]/<orgname>/<projectname>/ if subdomains are enabled.

您可能还需要在存储库设置页面中正确“启用”github 页面:https://help.github.com/enterprise/2.9/user/articles/configuring-a-publishing-source-for-github-pages/

关于github - Jekyll 与 GitHub Enterprise,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40194732/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com