mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 08:26:29 +00:00
Foramt privatekey
This commit is contained in:
@@ -119,7 +119,7 @@ export const getGitHubAppAuthToken = async (
|
|||||||
) => {
|
) => {
|
||||||
const appCfg = getConfig();
|
const appCfg = getConfig();
|
||||||
const appId = appCfg.INF_APP_CONNECTION_GITHUB_APP_ID;
|
const appId = appCfg.INF_APP_CONNECTION_GITHUB_APP_ID;
|
||||||
const appPrivateKey = appCfg.INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY;
|
let appPrivateKey = appCfg.INF_APP_CONNECTION_GITHUB_APP_PRIVATE_KEY;
|
||||||
|
|
||||||
if (!appId || !appPrivateKey) {
|
if (!appId || !appPrivateKey) {
|
||||||
throw new InternalServerError({
|
throw new InternalServerError({
|
||||||
@@ -127,6 +127,11 @@ export const getGitHubAppAuthToken = async (
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appPrivateKey = appPrivateKey
|
||||||
|
.split("\n")
|
||||||
|
.map((line) => line.trim())
|
||||||
|
.join("\n");
|
||||||
|
|
||||||
if (appConnection.method !== GitHubConnectionMethod.App) {
|
if (appConnection.method !== GitHubConnectionMethod.App) {
|
||||||
throw new InternalServerError({ message: "Cannot generate GitHub App token for non-app connection" });
|
throw new InternalServerError({ message: "Cannot generate GitHub App token for non-app connection" });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user