-
Notifications
You must be signed in to change notification settings - Fork 60.7k
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
Update generating-a-json-web-token-jwt-for-a-github-app.md #36105
base: main
Are you sure you want to change the base?
Conversation
In a fresh python installation the script needs both the PyJWT and the cryptography pip packages. Can be verified using a fresh docker python:3-alpine image: docker run -v $(pwd):/app -w /app python:3-alpine sh -c 'pip install PyJWT cryptography; python githubJwt.py some-github-app.2025-01-30.private-key.pem THE_GITHUB_APP_CLIENT_ID' Without pip install cryptography the command above will throw an error: NotImplementedError: Algorithm 'RS256' could not be found. Do you have cryptography installed? After `pip install PyJWT cryptography` it works
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
👓 Previews for changed contentThis comment is 🤖 automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Why: Python JWT example script throws an error without cryptography module
In a fresh python installation the python script for getting a JWT needs both the 'PyJWT' and the 'cryptography' pip packages installed.
Can be verified using a fresh docker python:3-alpine image:
The command above will throw an error:
NotImplementedError: Algorithm 'RS256' could not be found. Do you have cryptography installed?
If you add the cryptography package to pip install, it works:
Closes: #36104
What's being changed (if available, include any code snippets, screenshots, or gifs):
The pip install note above the Python example script is being updated to include both the 'PyJWT' and the 'cryptography' packages.
Check off the following: