Commit 438f1485 authored by Nick's avatar Nick

fix: handle git basic auth URl format (#814)

parent 26c7d49a
......@@ -109,8 +109,14 @@ module.exports = {
await this.git.addRemote('origin', this.config.repoUrl)
break
default:
WIKI.logger.info('(STORAGE/GIT) Adding origin remote via HTTPS...')
await this.git.addRemote('origin', `https://${this.config.basicUsername}:${this.config.basicPassword}@${this.config.repoUrl}`)
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}@`)
} else {
originUrl = `https://${this.config.basicUsername}:${this.config.basicPassword}@${this.config.repoUrl}`
}
await this.git.addRemote('origin', )
break
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment