# Unable to include a sample of a github repo file using jekyll\_github\_sample

**URL:** <https://talk.jekyllrb.com/t/unable-to-include-a-sample-of-a-github-repo-file-using-jekyll-github-sample/6729>\
**Category:** Help\
**Created:** [November 24, 2021, 10:12pm UTC](https://talk.jekyllrb.com/t/unable-to-include-a-sample-of-a-github-repo-file-using-jekyll-github-sample/6729 "2021-11-24T22:12:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TwoPizza9621536](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@TwoPizza9621536](https://talk.jekyllrb.com/u/TwoPizza9621536)\
**Post date:** [November 24, 2021, 10:12pm UTC](https://talk.jekyllrb.com/t/unable-to-include-a-sample-of-a-github-repo-file-using-jekyll-github-sample/6729/1 "2021-11-24T22:12:13Z")

</div>

I found a plugin on planet Jekyll called [jekyll\_github\_sample](https://github.com/bwillis/jekyll-github-sample), and it does not work with the following error/liquid tag exception in github actions:

```auto
# Build log
Liquid Exception: 404 Not Found in /github/workspace/collections/_posts/2021-10-02-comparing-languages.markdown
# Info to use --trace
/usr/local/lib/ruby/2.7.0/open-uri.rb:387:in `open_http': 404 Not Found (OpenURI::HTTPError)
# The entire ruby exception

```

On local, it is:

```auto
# Build log
Liquid Exception: Invalid argument @ rb_sysopen - https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c in the site's root directory.
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll_github_sample-0.3.2/lib/jekyll_github_sample/code_tag.rb:19:in `initialize': Invalid argument @ rb_sysopen - https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c (Errno::EINVAL)

```

So I try to use another but similar plugin called [jekyll\_github\_content](https://github.com/francisco-perez-sorrosal/jekyll-github-content), but it is giving me the 404 error that is shown in github actions. If anyone who uses these plugins can help me, thanks.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [November 25, 2021, 8:14pm UTC](https://talk.jekyllrb.com/t/unable-to-include-a-sample-of-a-github-repo-file-using-jekyll-github-sample/6729/2 "2021-11-25T20:14:18Z")

</div>

Can you supply a link to your repo and a branch?

Or a sample of your Gemfile and the markdown file on question so we can run the code ourselves? And see if you are passing arguments to the plugins correctly

* * *

Also make sure you follow the docs exactly with maybe an example they give and take out the failing code or file from your repo. So you start from a working state of general use of the plugin and then use it with your custom values.

e.g.

```auto
{% github_sample_ref /bwillis/versioncake/989237901cb873f96df12be48cbf1239be496bd7/Appraisals %}
{% highlight ruby %}
{% github_sample /bwillis/versioncake/989237901cb873f96df12be48cbf1239be496bd7/Appraisals 0 5 %}
{% endhighlight %}

```

* * *

Your link is correct in the browser.

[https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c](https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c)
