浏览代码

fix: setting git URL in git storage module if repository starts with http (#861)

Karol Herbst 6 年之前
父节点
当前提交
624297bc96
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/modules/storage/git/storage.js

+ 1 - 1
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}`
         }