feat: add ssh port override option for git module (#1432)
* Adding an override for the ssh port * fix: git module - ssh custom port Co-authored-by: Nicolas Giard <github@ngpixel.com>
This commit is contained in:
parent
f4e3fd0954
commit
b1c7edac90
@ -93,6 +93,12 @@ props:
|
|||||||
default: ''
|
default: ''
|
||||||
hint: Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).
|
hint: Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).
|
||||||
order: 50
|
order: 50
|
||||||
|
sshPort:
|
||||||
|
type: Number
|
||||||
|
title: SSH Port
|
||||||
|
default: 22
|
||||||
|
hint: Optional - SSH Authentication Only - Allows overriding ssh default port.
|
||||||
|
order: 60
|
||||||
actions:
|
actions:
|
||||||
- handler: syncUntracked
|
- handler: syncUntracked
|
||||||
label: Add Untracked Changes
|
label: Add Untracked Changes
|
||||||
|
@ -77,7 +77,10 @@ module.exports = {
|
|||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.git.addConfig('core.sshCommand', `ssh -i "${this.config.sshPrivateKeyPath}" -o StrictHostKeyChecking=no`)
|
if (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}`)
|
||||||
WIKI.logger.info('(STORAGE/GIT) Adding origin remote via SSH...')
|
WIKI.logger.info('(STORAGE/GIT) Adding origin remote via SSH...')
|
||||||
await this.git.addRemote('origin', this.config.repoUrl)
|
await this.git.addRemote('origin', this.config.repoUrl)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user