From 758f56ab51bfb74583e3eff6778f006ba6d5d2ff Mon Sep 17 00:00:00 2001 From: Edward Buckle Date: Wed, 10 Jun 2020 14:42:19 +0100 Subject: [PATCH] Add username field to secure repos Signed-off-by: Edward Buckle --- src/pfe/portal/modules/Templates.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pfe/portal/modules/Templates.js b/src/pfe/portal/modules/Templates.js index 0a5c47c0a..3bdd04102 100644 --- a/src/pfe/portal/modules/Templates.js +++ b/src/pfe/portal/modules/Templates.js @@ -324,6 +324,9 @@ async function constructRepositoryObject(url, description, name, isRepoProtected if (isRepoProtected !== undefined) { repository.protected = isRepoProtected; } + if (gitCredentials && gitCredentials.username) { + repository.authentication = { username: gitCredentials.username }; + } return repository; }