From 624297bc96bb38cd64c00597e2e3499dd756343a Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sun, 2 Jun 2019 19:04:57 +0200 Subject: [PATCH] fix: setting git URL in git storage module if repository starts with http (#861) --- server/modules/storage/git/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/storage/git/storage.js b/server/modules/storage/git/storage.js index a8090672..e051f314 100644 --- a/server/modules/storage/git/storage.js +++ b/server/modules/storage/git/storage.js @@ -112,7 +112,7 @@ module.exports = { WIKI.logger.info('(STORAGE/GIT) Adding origin remote via HTTP/S...') let originUrl = '' if (_.startsWith(this.config.repoUrl, 'http')) { - originUrl = originUrl.replace('://', `://${this.config.basicUsername}:${this.config.basicPassword}@`) + originUrl = this.config.repoUrl.replace('://', `://${this.config.basicUsername}:${this.config.basicPassword}@`) } else { originUrl = `https://${this.config.basicUsername}:${this.config.basicPassword}@${this.config.repoUrl}` }