Commit 4308152a authored by NGPixel's avatar NGPixel

fix: uriencode git user/pass for http remote

parent 6bf02615
......@@ -88,9 +88,9 @@ module.exports = {
WIKI.logger.info('(STORAGE/GIT) Adding origin remote via HTTP/S...')
let originUrl = ''
if (_.startsWith(this.config.repoUrl, 'http')) {
originUrl = this.config.repoUrl.replace('://', `://${this.config.basicUsername}:${this.config.basicPassword}@`)
originUrl = this.config.repoUrl.replace('://', `://${encodeURI(this.config.basicUsername)}:${encodeURI(this.config.basicPassword)}@`)
} else {
originUrl = `https://${this.config.basicUsername}:${this.config.basicPassword}@${this.config.repoUrl}`
originUrl = `https://${encodeURI(this.config.basicUsername)}:${encodeURI(this.config.basicPassword)}@${this.config.repoUrl}`
}
await this.git.addRemote('origin', originUrl)
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