diff --git a/src/set-tokens.ts b/src/set-tokens.ts index 793970367..8eb0afb89 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -97,12 +97,12 @@ This operation is prohibited to protect your contents } } - return `https://x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`; + return `${getServerUrl().protocol}//x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`; } export function setPersonalToken(personalToken: string, publishRepo: string): string { core.info('[INFO] setup personal access token'); - return `https://x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`; + return `${getServerUrl().protocol}//x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`; } export function getPublishRepo(externalRepository: string, owner: string, repo: string): string {