jekyll-github-metadata calls Pages API for private repos with Pages disabled, causing fatal 403
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- github, jekyll, ruby
- Ambito
- api, build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- Ruby
- Stelle
- 309
- Fork
- 159
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jekyll/github-metadata
-
PageAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
jekyll/github-metadata#294 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
jekyll/github-metadata#290 · 1 commento ·
-
Limit and/or Cache API requests to avoid: 403 - API rate limit exceeded for installation ID ___Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
jekyll/github-metadata#266 · 6 commenti · 4 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
jekyll/github-metadata#264 · 1 commento · 3 reazioni ·
-
Latest Commit Date for FileApertapinned
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
jekyll/github-metadata#130 · 5 commenti · 6 reazioni ·
Tutte le issue di jekyll/github-metadata
Issue simili
-
instrumentation-sidekiq
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
I maintainer di solito rispondono entro 2 giorni
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
ruby/securerandom#92 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
we-promise/sure#5902 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
avo-hq/avo#5065 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno