diff --git a/src/lib/importers/gitlab.ts b/src/lib/importers/gitlab.ts index 81ef54c10..0cf57d98a 100644 --- a/src/lib/importers/gitlab.ts +++ b/src/lib/importers/gitlab.ts @@ -10,7 +10,7 @@ export default async function ({ buildId, privateSshKey }): Promise { - const url = htmlUrl.replace('https://', '').replace('http://', ''); + const url = htmlUrl.replace('https://', '').replace('http://', '').replace(/\/$/, ''); await saveBuildLog({ line: 'GitLab importer started.', buildId, applicationId }); await asyncExecShell(`echo '${privateSshKey}' > ${repodir}/id.rsa`); await asyncExecShell(`chmod 600 ${repodir}/id.rsa`);