mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 04:45:19 +00:00
var name typo
This commit is contained in:
parent
6e44673562
commit
df8c72c3c5
3 changed files with 4 additions and 4 deletions
|
|
@ -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_
|
||||
|
|
|
|||
|
|
@ -60,5 +60,5 @@ export type RepoAuthCredentials = {
|
|||
hostUrl?: string;
|
||||
token: string;
|
||||
cloneUrlWithToken?: string;
|
||||
authToken?: string;
|
||||
authHeader?: string;
|
||||
}
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue