Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No GitHub API authentication" error #399

Closed
4 tasks done
tomjoht opened this issue Jan 27, 2017 · 15 comments
Closed
4 tasks done

"No GitHub API authentication" error #399

tomjoht opened this issue Jan 27, 2017 · 15 comments

Comments

@tomjoht
Copy link

tomjoht commented Jan 27, 2017

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

What did you do (e.g., steps to reproduce)

Add this into the Gemfile:

source "https://rubygems.org"

gem 'github-pages', group: :jekyll_plugins

Run bundle update and bundle exec jekyll serve.
Make a small edit to a file.
When Jekyll auto-rebuilds, an error appears in the Terminal that says "GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data."

What did you expect to happen?

I did not expect that Github Metadata error to appear.

Additional information

When I removed the Gemfile, the error went away. Since this is the only gem outside of Jekyll that I'm using in my project, I suspect the error has something to do with github-pages. That's why I'm filing an issue here.

I fixed the issue by following the resolution described here. This removed the error from occurring.

I just wanted to report this error in case there's something with the github-pages gem that is causing it.

@parkr
Copy link
Contributor

parkr commented Feb 16, 2017

Hey @tomjohnson1492! This is expected. The jekyll-github-metadata gem is automatically enabled for GitHub Pages builds (including builds using this gem locally). It pulls in information from the GitHub API, but first checks the environment for authentication, which is required for some API calls to return the data we want. It's a warning, not an error, so you should be good to ignore them locally. 👍

@parkr parkr closed this as completed Feb 16, 2017
@SeanKilleen
Copy link

SeanKilleen commented Feb 16, 2017

@parkr I think the issue here is that it appears to break Jekyll's watch functionality.

In the scenario described here, which I'm also hitting, I have the following:

Repro

  • Setup the gemfile as described above
  • run bundle exec jekyll serve (which watches for changes and regenerates each time)
  • make a change to a file and save
  • See the "warning" errors

Expected behavior

The files are still generated on each change and we can ignore the errors.

Actual behavior

The jekyll pipeline is broken. The file changes are not actually processed, because jekyll perceives an error to have happened during generation.

In addition to the warning message, I see the following errors:

Error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
             Error: Run jekyll build --trace for more information.

Instead, we are required to force-quit jekyll and run bundle exec jekyll serve each time.

Does this help clarify the issue? If so, it would be awesome to open this up for a second look.

It's also possible that this may be a separate issue entirely; if so, I'm happy to create a new ticket.

Update: A workaround (sort of?)

The workaround described here and referenced above requires two environment variables, a cacert file download, and seemingly a restart of the PC.

I'll try this as a workaround and note it in my README if it works.

Alternatively, is there a way we can disable this gem or functionality locally? I apologize for jumping in with a lack of familiarity on the structure of the project (a project which I appreciate on a daily basis, btw -- thank you!)

@coin8086
Copy link

coin8086 commented May 4, 2017

I have the same problem with the new version of github-pages (136) on jekyll (= 3.4.3). It breaks the common dev flow locally, that is the convenient edit-and-refresh way. So I hope it will be fixed soon.

@asnowfix
Copy link

The work-around described above does not work for me. I am using a GitHub Enterprise instance & tried using a personal access token generated by GHE & a one generated by GH.com. None worked & I am still getting the error message at each refresh:

      Regenerating: 1 file(s) changed at 2017-05-16 12:27:51 ...error:
             Error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
             Error: Run jekyll build --trace for more information.

Despite the hint above, $ jekyll build --trace --watch does not give anything more useful:

      Regenerating: 1 file(s) changed at 2017-05-16 12:25:13 ...error:
             Error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
             Error: Run jekyll build --trace for more information.

@asnowfix
Copy link

Fixed my issue (not saying it is yours) by adding...

github: [metadata]

...to _config.yml

@whizzzkid
Copy link

fix by @asnowfix works :) thanks 👍

@abhishekp1996
Copy link

A ton thanks to @asnowfix
The fix works very well.

I need to point out, add the code as it is. [metadata] will be automatically pulled by the generator.

@fgreve
Copy link

fgreve commented Jun 4, 2017

Thanks to @asnowfix

@super456
Copy link

@asnowfix
I'm very grateful to you !:smile:

@john20xdoe
Copy link

as per @asnowfix fix, this results in a missing site.title (blank values?). but other wise the site was being served locally successfully.

crandmck added a commit to expressjs/expressjs.com that referenced this issue Aug 17, 2017
@wrschneider
Copy link

thanks @asnowfix, this was driving me crazy.

@karamfd
Copy link

karamfd commented Sep 18, 2017

@asnowfix Your solution is working perfectly for me as well. Thank you very much 😃

goxcif added a commit to goxcif/goxcif.github.io that referenced this issue Oct 25, 2017
@troccoli
Copy link

Thank you @asnowfix . Worked for me too.

@seanlerner
Copy link

@asnowfix solution didn't work for me.

I ended up generating a token and putting it in my env:

Generate token: https://github.com/settings/tokens

Run:

JEKYLL_GITHUB_TOKEN=<your token> jekyll serve

Or you can add to your shell config file:

#  .zshrc, .bashrc or .bash_profile

export JEKYLL_GITHUB_TOKEN=<your token>

Then in terminal:

source ~/.zshrc

joeyquarters added a commit to joeyquarters/joeyquarters.github.io that referenced this issue Mar 29, 2018
pralitp added a commit to JGCRI/gcam-doc that referenced this issue Jun 14, 2018
Whispres added a commit to Whispres/whispres.github.io that referenced this issue Jul 2, 2018
Following suggestions to resolve this [issue](github/pages-gem#399).
stevieoberg added a commit to stevieoberg/stevieoberg.github.io that referenced this issue Jul 31, 2018
stevieoberg added a commit to stevieoberg/stevieoberg.github.io that referenced this issue Jul 31, 2018
nixilla added a commit to chgst/chgst.github.io that referenced this issue Sep 11, 2018
jameswilson added a commit to jameswilson/jameswilson.github.io that referenced this issue Oct 22, 2018
jameswilson added a commit to jameswilson/jameswilson.github.io that referenced this issue Oct 22, 2018
mattagape pushed a commit to UCL-ARC/hpc-shell that referenced this issue Jul 7, 2020
* 🏛 Adds details for UCL

* 👷⭕ Add CI to build preview of the PR

* 👷 Changed orb used to build the page

* 👷 removes executor - it may not be needed

* 👷 Using a 🧪🐋

* 👷 Run 🧪 by itself without bundle (also without caching dependencies)

* 👷 Remove any Orb (they don't work as I think)

* 👷 Use an official 🧪🐋 instead (it takes forever to install it otherwise)

* 👷 install everything using Gemfiles and caching it

* 👷 to build only for UCL 🏛

* 👷:pencil2: Fix small error! awk was only printing, not saving the changes

* 👷🐛 Fix a warning shown by Jekyll and GH API

Answer provided by this answer
github/pages-gem#399 (comment)

* 👷 Removed the "fix" that it doesn't work and the check for errors

* 👷🐛 Now I was getting an empty config! awk now allows also `inplace`!

* 👷🐛 who knows which version of awk they have there - using classic way

i.e. creating a tmp file in between
dpshelio added a commit to UCL-ARC/hpc-shell that referenced this issue Jul 13, 2020
👷 Changed orb used to build the page

👷 removes executor - it may not be needed

👷 Using a 🧪🐋

👷 Run 🧪 by itself without bundle (also without caching dependencies)

👷 Remove any Orb (they don't work as I think)

👷 Use an official 🧪🐋 instead (it takes forever to install it otherwise)

👷 install everything using Gemfiles and caching it

👷 to build only for UCL 🏛

👷:pencil2: Fix small error! awk was only printing, not saving the changes

👷🐛 Fix a warning shown by Jekyll and GH API

Answer provided by this answer
github/pages-gem#399 (comment)

👷 Removed the "fix" that it doesn't work and the check for errors

👷🐛 Now I was getting an empty config! awk now allows also `inplace`!

👷🐛 who knows which version of awk they have there - using classic way

i.e. creating a tmp file in between
ElectricRCAircraftGuy added a commit to ElectricRCAircraftGuy/ElectricRCAircraftGuy.github.io that referenced this issue Nov 5, 2020
The error was:

> GitHub Metadata: No GitHub API authentication could be found. Some
> fields may be missing or have incorrect data.

The fix:
github/pages-gem#399 (comment)
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 1, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 2, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 6, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 6, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 11, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 11, 2021
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Jan 28, 2021
samuelhward added a commit to samuelhward/Millennial that referenced this issue Mar 28, 2021
Fix the message "GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data." as mentioned in github/pages-gem#399.
mariha added a commit to OpenHospitalityNetwork/openHospitality.network that referenced this issue Jul 1, 2021
"GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data."

To create a personal access token: (public_repo scope is enough for public repository): https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

github/pages-gem#399 (comment)
jeffreytse added a commit to jeffreytse/jekyll-deploy-action that referenced this issue Oct 20, 2021
benknoble added a commit to benknoble/benknoble.github.io that referenced this issue Oct 31, 2021
Since I'm building it with an Action now, I don't need to depend on
GitHub pages' locked down build process. That prevented _plugins from
running. Moving away from the old gem also simplifies _config.yml.

Note that for GitHub metadata we need the fix from
github/pages-gem#399.
gdubya added a commit to gdubya/stavtaket.github.io that referenced this issue Nov 18, 2021
acarril added a commit to acarril/acarril.github.io that referenced this issue Apr 29, 2022
DerekNonGeneric added a commit to OpenINF/openinf.github.io that referenced this issue Aug 26, 2022
Refs: github/pages-gem#399

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests