index.js / getFetchUrl(): Include deployment path

getFetchUrl() returns an URL of the form

<scheme>://<host>[:port]/<owner>/<repo-name>

This is incompatible with deployments under

<scheme>://<host>[:port]/<base-path>/<owner>/<repo-name>

and it breaks authentication for me. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-10 10:06:26 +02:00
commit 51024307b5

3
dist/index.js vendored
View file

@ -2730,8 +2730,7 @@ function getFetchUrl(settings) {
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
return `${serviceUrl}/${encodedOwner}/${encodedName}`;
}
function getServerUrl(url) {
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';