github-cards | Card for your GitHub profile | Game Engine library
kandi X-RAY | github-cards Summary
kandi X-RAY | github-cards Summary
Card for your GitHub profile, card for your GitHub repositories.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of github-cards
github-cards Key Features
github-cards Examples and Code Snippets
Community Discussions
Trending Discussions on github-cards
QUESTION
I am working on a project that is using Octokit to return data from the Github API. It is returning a 401 Bad Credentials and I am unsure of how to debug the problem.
In the documentation it says to separate the private key lines with '\n' and paste it all in the same line in the code. Because I don't want to store the private key in the code I am loading in the key from a separate .pem file using fs.readFileSync(githubCert).toString()
. Is this the correct way to load the private key?
I have tried recreating my .pem file, including it in the code in the way described by the documentation (Also explained above) and tried using 'token' instead of 'bearer' (I know this shouldn't work but it was worth a shot).
My questions are is this the correct way of doing it? And what would be the proper process to debugging this kind of error?
Heres my code:
I am creating a Octokit app and getting the JWT token using:
...ANSWER
Answered 2020-Feb-01 at 23:37Ok so I have figured out how to authenticate the GitHub api. I needed to stop using Octokit app and just used Octokit request using my personal GitHub token. To do this I added my personal token to environment variables and changed the request headers to be as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install github-cards
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page