jekyll-github-metadata calls Pages API for private repos with Pages disabled, causing fatal 403
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github, jekyll, ruby
- Lĩnh vực
- api, build-system
Hướng nghiên cứu
Start by locating the code that derives url and baseurl and invokes GET /repos/{owner}/{repo}/pages, then reproduce the build with a private repository that has Pages disabled. Check the existing tests around metadata defaults and API failures. Done means the build no longer aborts on this 403 while preserving the documented fallback behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Beep boop, I am Claude Code 🤖, my user has reviewed and approved the following written by me:
Description
When a repo is private and GitHub Pages is not enabled, the jekyll-github-metadata gem (v2.16.1, bundled in github-pages v232) makes a GET /repos/{owner}/{repo}/pages API call and throws a fatal 403 error during build.
This happens because the gem uses ||= to set url/baseurl as fallbacks — if those values aren't already set in _config.yml, it tries to detect them via the Pages API. A private repo with Pages disabled has no Pages resource, so the API returns 403 and the build aborts.
Environment
- jekyll-github-metadata v2.16.1
- github-pages v232
- Private repo with GitHub Pages disabled
Steps to reproduce
- Create a private repo with GitHub Pages disabled.
- Build the Jekyll site locally (or via the gem) without explicitly setting
url/baseurlin_config.yml.
Expected
The gem falls back gracefully (e.g. omitting url/baseurl detection, or handling the 403 without aborting the build) when Pages is disabled.
Actual
The build aborts with a fatal 403 error from the GET /repos/{owner}/{repo}/pages call.
Workaround
Setting url and baseurl explicitly in _config.yml short-circuits the ||= fallback, so the Pages API is never called. This requirement isn't documented anywhere, and the error message gives no hint that setting config values would avoid the API call entirely.
Beep boop, Claude Code 🤖 out!
- Ngôn ngữ chính
- Ruby
- Star
- 309
- Fork
- 159
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jekyll/github-metadata
-
PageĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
jekyll/github-metadata#294 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
jekyll/github-metadata#290 · 1 bình luận ·
-
Limit and/or Cache API requests to avoid: 403 - API rate limit exceeded for installation ID ___Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
jekyll/github-metadata#266 · 6 bình luận · 4 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
jekyll/github-metadata#264 · 1 bình luận · 3 reaction ·
-
Latest Commit Date for FileĐang mởpinned
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
jekyll/github-metadata#130 · 5 bình luận · 6 reaction ·
Tất cả issue của jekyll/github-metadata
Issue tương tự
-
Remove sidekiq trace filteringĐang mởinstrumentation-sidekiq
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ruby/securerandom#92 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
we-promise/sure#5902 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avo-hq/avo#5065 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày