Github Pages - A file was included is a symlink or does not exist

For me the issue was I was using Jekyll and had a RubyGem that was not supported by Github Pages.

I would suggest trying the following if you are getting the above error and using Jekyll:

  1. Try building locally ( run bundle exec jekyll serve in terminal or bash) and check if you can get the root cause. You need to have Ruby and Bundler installed for this.

  2. If the site builds locally without any issue, the build issue in Github could be due to a different Gem version. You can check the versions of Gems used by Github pages here . Try changing the Gems used locally to the ones used by Github pages, to reproduce the issue locally.

  3. If you would like to still use the Gems you have installed and doesn't need the build to be done by Github pages, you can generate the static site locally by executing jekyll serve and push the just content of "_site" folder to your repository's master branch. This gives us finer control on Gems we wish to use


It looks like you're using a custom source. You're not allowed to use custom sources in your Jekyll sites on GitHub Pages. They override it to your repo's top directory. So it's looking for ./_includes/... rather than ./docs/_includes.


It seems you're using Jekyll and this answer is 2 years old, but for anyone else with similar problems: check if you need Jekyll. If you don't, adding an empty file named .nojekyll to the root of the repository should fix it.