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/baseurl in _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!
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}/pagesAPI call and throws a fatal 403 error during build.This happens because the gem uses
||=to seturl/baseurlas 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
Steps to reproduce
url/baseurlin_config.yml.Expected
The gem falls back gracefully (e.g. omitting
url/baseurldetection, 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}/pagescall.Workaround
Setting
urlandbaseurlexplicitly in_config.ymlshort-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!