jekyll-github-metadata calls Pages API for private repos with Pages disabled, causing fatal 403
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 58/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- github, jekyll, ruby
- Domaine
- api, build-system
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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!
- Langage dominant
- Ruby
- Étoiles
- 309
- Forks
- 159
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de jekyll/github-metadata
-
PageOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
jekyll/github-metadata#294 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
jekyll/github-metadata#290 · 1 commentaire ·
-
Limit and/or Cache API requests to avoid: 403 - API rate limit exceeded for installation ID ___Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
jekyll/github-metadata#266 · 6 commentaires · 4 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
jekyll/github-metadata#264 · 1 commentaire · 3 réactions ·
-
Latest Commit Date for FileOuvertepinned
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 28/100
jekyll/github-metadata#130 · 5 commentaires · 6 réactions ·
Toutes les issues de jekyll/github-metadata
Issues similaires
-
Remove sidekiq trace filteringOuverteinstrumentation-sidekiq
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
open-telemetry/opentelemetry-ruby-contrib#2735 ·
Les mainteneurs répondent en général sous 2 jours
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raisingOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
ruby/securerandom#92 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
we-promise/sure#5902 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
avo-hq/avo#5065 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour