fix: remove ssh port param for git module

This commit is contained in:
NGPixel
2020-04-25 14:04:14 -04:00
parent c15d1a4967
commit b2931471c0
3 changed files with 2 additions and 21 deletions

View File

@@ -93,12 +93,6 @@ props:
default: ''
hint: Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).
order: 50
sshPort:
type: Number
title: SSH Port
default: 22
hint: Optional - SSH Authentication Only - Allows overriding ssh default port (22).
order: 60
actions:
- handler: syncUntracked
label: Add Untracked Changes

View File

@@ -77,10 +77,7 @@ module.exports = {
throw err
}
}
if (!this.config.sshPort || (_.isString(this.config.sshPort) && _.isEmpty(this.config.sshPort.length)) || (_.isSafeInteger(this.config.sshPort) && this.config.sshPort <= 0)) {
this.config.sshPort = 22
}
await this.git.addConfig('core.sshCommand', `ssh -i "${this.config.sshPrivateKeyPath}" -o StrictHostKeyChecking=no -p ${this.config.sshPort}`)
await this.git.addConfig('core.sshCommand', `ssh -i "${this.config.sshPrivateKeyPath}" -o StrictHostKeyChecking=no`)
WIKI.logger.info('(STORAGE/GIT) Adding origin remote via SSH...')
await this.git.addRemote('origin', this.config.repoUrl)
break