Skip to content

Commit 145ce09

Browse files
feat: Add flexible GitHub App private key configuration
- Updated .env.example with two options for GitHub App private key configuration - Added `PRIVATE_KEY_PATH` as a secure alternative to directly pasting private key contents - Updated README and techContext.md to document the new configuration option - Improved documentation for GitHub App private key setup and security recommendations
1 parent 72f80a2 commit 145ce09

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.env.example

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ WEBHOOK_PROXY_URL=
1111
# GitHub App Setup (required)
1212
# Your GitHub App's private key, get this from the GitHub App settings page
1313
# To generate: Go to https://github.com/settings/apps -> Your app -> General -> Private keys -> Generate a private key
14-
# Copy the contents of the downloaded .pem file and paste it here
14+
#
15+
# You need EITHER Option 1 OR Option 2 below (not both):
16+
#
17+
# OPTION 1: Copy the contents of the downloaded .pem file and paste it here
1518
# For multi-line values in .env, use quotes and \n for line breaks:
1619
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
1720
...
1821
-----END RSA PRIVATE KEY-----"
1922

23+
# OPTION 2: Specify the path to your private key file (recommended for security)
24+
# PRIVATE_KEY_PATH=/path/to/your/private-key.pem
25+
2026
# patchmycode Configuration
2127
# API keys for LLM services (required for code fixing)
2228
# OpenAI API Key - Required for GPT models

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ npm start
150150

151151
#### Core Configuration
152152
- `APP_ID`: Your GitHub App ID
153-
- `PRIVATE_KEY`: Your GitHub App's private key
153+
- `PRIVATE_KEY`: Your GitHub App's private key (contents of the .pem file)
154+
- `PRIVATE_KEY_PATH`: Alternative to PRIVATE_KEY, specify path to the .pem file (recommended for security)
154155
- `WEBHOOK_SECRET`: Your GitHub App's webhook secret
155156
- `WEBHOOK_PROXY_URL`: URL for webhook proxying (for local development with smee.io)
156157
- `LOG_LEVEL`: Logging level (`debug`, `info`, `warn`, or `error`)

memory-bank/techContext.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141

4242
### Environment Variables
4343
- `APP_ID`: GitHub App ID from GitHub App registration
44-
- `PRIVATE_KEY`: Private key from GitHub App registration
44+
- `PRIVATE_KEY`: Private key from GitHub App registration (contents of the .pem file)
45+
- `PRIVATE_KEY_PATH`: Alternative to PRIVATE_KEY, path to the .pem file (recommended)
4546
- `WEBHOOK_SECRET`: Secret for webhook verification
4647
- `WEBHOOK_PROXY_URL`: URL for local development webhook forwarding
4748
- `LOG_LEVEL`: Logging level (debug, info, warn, error)

0 commit comments

Comments
 (0)