var name typo

This commit is contained in:
msukkari 2025-09-27 16:35:09 -07:00
parent 6e44673562
commit df8c72c3c5
3 changed files with 4 additions and 4 deletions

View file

@ -175,7 +175,7 @@ export class RepoManager {
const credentials = await getAuthCredentialsForRepo(repo, this.db); const credentials = await getAuthCredentialsForRepo(repo, this.db);
const cloneUrlMaybeWithToken = credentials?.cloneUrlWithToken ?? repo.cloneUrl; const cloneUrlMaybeWithToken = credentials?.cloneUrlWithToken ?? repo.cloneUrl;
const authHeader = credentials?.authToken ?? undefined; const authHeader = credentials?.authHeader ?? undefined;
if (existsSync(repoPath) && !isReadOnly) { if (existsSync(repoPath) && !isReadOnly) {
// @NOTE: in #483, we changed the cloning method s.t., we _no longer_ // @NOTE: in #483, we changed the cloning method s.t., we _no longer_

View file

@ -60,5 +60,5 @@ export type RepoAuthCredentials = {
hostUrl?: string; hostUrl?: string;
token: string; token: string;
cloneUrlWithToken?: string; cloneUrlWithToken?: string;
authToken?: string; authHeader?: string;
} }

View file

@ -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 // 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 // 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') { if (config.deploymentType === 'server') {
return { return {
hostUrl: config.url, hostUrl: config.url,
token, token,
authToken: "Authorization: Basic " + Buffer.from(`:${token}`).toString('base64') authHeader: "Authorization: Basic " + Buffer.from(`:${token}`).toString('base64')
} }
} else { } else {
return { return {