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:
parent
0c366fd6a8
commit
51024307b5
1 changed files with 1 additions and 2 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
|
@ -2730,8 +2730,7 @@ function getFetchUrl(settings) {
|
||||||
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
|
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
|
||||||
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
|
||||||
}
|
}
|
||||||
// "origin" is SCHEME://HOSTNAME[:PORT]
|
return `${serviceUrl}/${encodedOwner}/${encodedName}`;
|
||||||
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
|
|
||||||
}
|
}
|
||||||
function getServerUrl(url) {
|
function getServerUrl(url) {
|
||||||
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue