jekyll-github-metadata calls Pages API for private repos with Pages disabled, causing fatal 403
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 58/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- github, jekyll, ruby
- Bereich
- api, build-system
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Ruby
- Sterne
- 309
- Forks
- 159
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus jekyll/github-metadata
-
PageOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
jekyll/github-metadata#294 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
jekyll/github-metadata#290 · 1 Kommentar ·
-
Limit and/or Cache API requests to avoid: 403 - API rate limit exceeded for installation ID ___Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
jekyll/github-metadata#266 · 6 Kommentare · 4 Reaktionen ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
jekyll/github-metadata#264 · 1 Kommentar · 3 Reaktionen ·
-
pinned
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 28/100
jekyll/github-metadata#130 · 5 Kommentare · 6 Reaktionen ·
Alle Issues in jekyll/github-metadata
Ähnliche Issues
-
instrumentation-sidekiq
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ruby/securerandom#92 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
we-promise/sure#5902 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
avo-hq/avo#5065 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag