From cada7cb473a5df751c202f904f5a70f2f5354f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flemming=20J=C3=B8nsson?= Date: Thu, 30 Jan 2025 14:30:00 +0100 Subject: [PATCH 1/3] Update generating-a-json-web-token-jwt-for-a-github-app.md 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 --- .../generating-a-json-web-token-jwt-for-a-github-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md index 4922007c9941..602bf9b6626e 100644 --- a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md @@ -77,7 +77,7 @@ puts jwt ### Example: Using Python to generate a JWT > [!NOTE] -> You must run `pip install PyJWT` to install the `PyJWT` package in order to use this script. +> You must run `pip install PyJWT cryptography` to install the `PyJWT` and cryptography packages in order to use this script. ```python copy #!/usr/bin/env python3 From 804da573f717c66920e22fc48df2f42a0e8ba962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flemming=20J=C3=B8nsson?= Date: Thu, 30 Jan 2025 14:58:10 +0100 Subject: [PATCH 2/3] Added quotes around the cryptography module name --- .../generating-a-json-web-token-jwt-for-a-github-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md index 602bf9b6626e..395f76beac71 100644 --- a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md @@ -77,7 +77,7 @@ puts jwt ### Example: Using Python to generate a JWT > [!NOTE] -> You must run `pip install PyJWT cryptography` to install the `PyJWT` and cryptography packages in order to use this script. +> You must run `pip install PyJWT cryptography` to install the `PyJWT` and the 'cryptography' packages in order to use this script. ```python copy #!/usr/bin/env python3 From 3635b584f809eb38f13ea83f211b1727cb28dd87 Mon Sep 17 00:00:00 2001 From: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Date: Wed, 5 Feb 2025 08:11:01 +0000 Subject: [PATCH 3/3] Update content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../generating-a-json-web-token-jwt-for-a-github-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md index 395f76beac71..0036f1652f4e 100644 --- a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.md @@ -77,7 +77,7 @@ puts jwt ### Example: Using Python to generate a JWT > [!NOTE] -> You must run `pip install PyJWT cryptography` to install the `PyJWT` and the 'cryptography' packages in order to use this script. +> You must run `pip install PyJWT cryptography` to install the `PyJWT` and the `cryptography` packages in order to use this script. ```python copy #!/usr/bin/env python3