Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't assume HTTPS is only protocol for git servers #1106

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't assume protocol is HTTPS
While I believe this would work with github enterprise it breaks selfhosted runners like act and gitea/forjego actions.
  • Loading branch information
traverseda authored Oct 19, 2024
commit 7f0cd668b884440bc7d6a66884e247b7774e48a9
4 changes: 2 additions & 2 deletions src/set-tokens.ts
Original file line number Diff line number Diff line change
@@ -97,12 +97,12 @@ This operation is prohibited to protect your contents
}
}

return `https://x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`;
return `${getServerUrl().host}//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().host}//x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`;
}

export function getPublishRepo(externalRepository: string, owner: string, repo: string): string {