You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Move VerifyJWT to test file to avoid exporting test-only helpers
- Use RWMutex with double-check pattern to avoid blocking reads during
token refresh
- Add UserAgentTransport to GraphQL path when using App auth for
consistency with REST
- Make GITHUB_APP_PRIVATE_KEY and GITHUB_APP_PRIVATE_KEY_PATH mutually
exclusive (return error when both are set)
- Only replace literal \n when the private key has no real newlines to
avoid corrupting correctly-passed keys
- Use safer JWT lifetime (iat=now-30s, exp=now+9m) to stay well within
GitHub's 10-minute maximum
- Document that base transport must not inject its own Authorization
header
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,7 +254,7 @@ The server automatically generates JWTs, fetches installation tokens, and refres
254
254
|`GITHUB_APP_PRIVATE_KEY`| The PEM-encoded private key (inline, `\n` for newlines) |
255
255
|`GITHUB_APP_PRIVATE_KEY_PATH`| Path to the private key file (alternative to inline) |
256
256
257
-
Either `GITHUB_APP_PRIVATE_KEY` or `GITHUB_APP_PRIVATE_KEY_PATH` must be set, but not both. When all three required variables (`GITHUB_APP_ID`, `GITHUB_APP_INSTALLATION_ID`, and a private key) are set, the server uses GitHub App authentication instead of a PAT. `GITHUB_PERSONAL_ACCESS_TOKEN` is not required in this case.
257
+
Either `GITHUB_APP_PRIVATE_KEY` or `GITHUB_APP_PRIVATE_KEY_PATH` must be set, but not both (they are mutually exclusive). When all three required variables (`GITHUB_APP_ID`, `GITHUB_APP_INSTALLATION_ID`, and a private key) are set, the server uses GitHub App authentication instead of a PAT. `GITHUB_PERSONAL_ACCESS_TOKEN` is not required in this case.
return0, nil, 0, errors.New("incomplete GitHub App auth config: GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, and GITHUB_APP_PRIVATE_KEY or GITHUB_APP_PRIVATE_KEY_PATH are all required")
267
267
}
268
268
269
+
ifprivateKeyStr!=""&&privateKeyPath!="" {
270
+
return0, nil, 0, errors.New("GITHUB_APP_PRIVATE_KEY and GITHUB_APP_PRIVATE_KEY_PATH are mutually exclusive")
0 commit comments