fix: do not convert ssh repositoryUrl to https

This commit is contained in:
Pierre Vanduynslager
2018-08-08 12:02:02 -04:00
parent 8b8e40c91e
commit b89523105c
2 changed files with 23 additions and 2 deletions
+13
View File
@@ -265,3 +265,16 @@ test('Do not add git credential to repositoryUrl if push is allowed', async t =>
repositoryUrl
);
});
test('Do not add git credentials if repositoryUrl is a "ssh" URL', async t => {
const {cwd} = await gitRepo();
t.is(
await getAuthUrl({
cwd,
env: {...env, GIT_CREDENTIALS: 'user:pass'},
options: {branch: 'master', repositoryUrl: 'ssh://git@host.null/owner/repo.git'},
}),
'ssh://git@host.null/owner/repo.git'
);
});