github-metadata icon indicating copy to clipboard operation
github-metadata copied to clipboard

How to filter out a repository that is not obtained when using Jekyll Github Metadata to retrieve GitHub repositories

Open longfeizheng opened this issue 6 months ago • 1 comments

When a repository is disabled, there is a problem using jekyll github metadata to retrieve all public repositories, resulting in the following error:

Liquid Exception: GET  https://api.github.com/repos/longfeizheng/GLaDOS-checkin/releases?per_page=100:  403 - Repository access blocked in /_layouts/page.html

error code

{% if site.github.public_repositories != null %}

repository url:https://github.com/longfeizheng/GLaDOS-checkin/settings

So I need to filter out certain repositories when requesting, is there any configuration or other method? Thank you

longfeizheng avatar Jun 13 '25 16:06 longfeizheng

I have another case.

The build will fail when a user forks a repository that has been blocked due to a DMCA takedown notice. Additionally, the user cannot delete these forked repositories themselves. Error report:

GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
  Liquid Exception: GET https://api.github.com/repos/lrita/bypass-paywalls-chrome/releases?per_page=100: 451 - Repository access blocked in /_layouts/page.html
jekyll 3.10.0 | Error:  GET https://api.github.com/repos/lrita/bypass-paywalls-chrome/releases?per_page=100: 451 - Repository access blocked
/lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/response/raise_error.rb:14:in `on_complete': GET https://api.github.com/repos/lrita/bypass-paywalls-chrome/releases?per_page=100: 451 - Repository access blocked (Octokit::UnavailableForLegalReasons)
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/middleware.rb:57:in `block in call'
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/response.rb:42:in `on_complete'
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/middleware.rb:56:in `call'
	from /lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
	from /lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/middleware/follow_redirects.rb:61:in `call'
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/rack_builder.rb:153:in `build_response'
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/connection.rb:452:in `run_request'
	from /lib/ruby/gems/3.1.0/gems/faraday-2.13.4/lib/faraday/connection.rb:200:in `get'
	from /lib/ruby/gems/3.1.0/gems/sawyer-0.9.2/lib/sawyer/agent.rb:99:in `call'
	from /lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/connection.rb:156:in `request'
	from /lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/connection.rb:84:in `paginate'
	from /lib/ruby/gems/3.1.0/gems/octokit-4.25.1/lib/octokit/client/releases.rb:15:in `releases'
	from /lib/ruby/gems/3.1.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/client.rb:63:in `public_send'
	from /lib/ruby/gems/3.1.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/client.rb:63:in `block in method_missing'
	from /lib/ruby/gems/3.1.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/client.rb:92:in `save_from_errors'
	from /lib/ruby/gems/3.1.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/client.rb:63:in `method_missing'
	from /lib/ruby/gems/3.1.0/gems/jekyll-github-metadata-2.16.1/lib/jekyll-github-metadata/repository.rb:123:in `block (3 levels) in owner_public_repositories'

lrita avatar Aug 21 '25 02:08 lrita