3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2026-06-28 23:58:52 +00:00
This commit is contained in:
axi92 2026-06-03 15:36:31 +02:00 committed by GitHub
commit 56893522df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 94 additions and 2 deletions

5
dist/index.js vendored
View file

@ -174,7 +174,10 @@ class GitAuthHelper {
this.tokenConfigValue = `AUTHORIZATION: basic ${basicCredential}`;
// Instead of SSH URL
this.insteadOfKey = `url.${serverUrl.origin}/.insteadOf`; // "origin" is SCHEME://HOSTNAME[:PORT]
this.insteadOfValues.push(`git@${serverUrl.hostname}:`);
const sshUser = this.settings.sshUser && this.settings.sshUser.length > 0
? this.settings.sshUser
: 'git';
this.insteadOfValues.push(`${sshUser}@${serverUrl.hostname}:`);
if (this.settings.workflowOrganizationId) {
this.insteadOfValues.push(`org-${this.settings.workflowOrganizationId}@github.com:`);
}