diff --git a/packages/backend/src/repoManager.ts b/packages/backend/src/repoManager.ts index a0147942..89e41673 100644 --- a/packages/backend/src/repoManager.ts +++ b/packages/backend/src/repoManager.ts @@ -175,7 +175,7 @@ export class RepoManager { const credentials = await getAuthCredentialsForRepo(repo, this.db); const cloneUrlMaybeWithToken = credentials?.cloneUrlWithToken ?? repo.cloneUrl; - const authHeader = credentials?.authToken ?? undefined; + const authHeader = credentials?.authHeader ?? undefined; if (existsSync(repoPath) && !isReadOnly) { // @NOTE: in #483, we changed the cloning method s.t., we _no longer_ diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index 5edee85a..2ea42d04 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -60,5 +60,5 @@ export type RepoAuthCredentials = { hostUrl?: string; token: string; cloneUrlWithToken?: string; - authToken?: string; + authHeader?: string; } \ No newline at end of file diff --git a/packages/backend/src/utils.ts b/packages/backend/src/utils.ts index 0ea3371a..e6ac5f93 100644 --- a/packages/backend/src/utils.ts +++ b/packages/backend/src/utils.ts @@ -196,12 +196,12 @@ export const getAuthCredentialsForRepo = async (repo: RepoWithConnections, db: P // For ADO server, multiple auth schemes may be supported. If the ADO deployment supports NTLM, the git clone will default // to this over basic auth. As a result, we cannot embed the token in the clone URL and must force basic auth by passing in the token - // appropriately in the header. To do this, we set the authToken field here + // appropriately in the header. To do this, we set the authHeader field here if (config.deploymentType === 'server') { return { hostUrl: config.url, token, - authToken: "Authorization: Basic " + Buffer.from(`:${token}`).toString('base64') + authHeader: "Authorization: Basic " + Buffer.from(`:${token}`).toString('base64') } } else { return {