add config option to set github host

This commit is contained in:
GABeech 2022-06-14 22:12:53 -04:00
parent 2541b1294d
commit 2202a283a7
3 changed files with 13 additions and 3 deletions

View file

@ -52,7 +52,7 @@ class GitAuthHelper {
this.settings = gitSourceSettings || (({} as unknown) as IGitSourceSettings)
// Token auth header
const serverUrl = urlHelper.getServerUrl()
const serverUrl = urlHelper.getServerUrl(gitSourceSettings?.setHost)
this.tokenConfigKey = `http.${serverUrl.origin}/.extraheader` // "origin" is SCHEME://HOSTNAME[:PORT]
const basicCredential = Buffer.from(
`x-access-token:${this.settings.authToken}`,