fix: git custom ssh port not handled
This commit is contained in:
parent
02816b68d0
commit
2213ba2c81
@ -97,7 +97,7 @@ props:
|
|||||||
type: Number
|
type: Number
|
||||||
title: SSH Port
|
title: SSH Port
|
||||||
default: 22
|
default: 22
|
||||||
hint: Optional - SSH Authentication Only - Allows overriding ssh default port.
|
hint: Optional - SSH Authentication Only - Allows overriding ssh default port (22).
|
||||||
order: 60
|
order: 60
|
||||||
actions:
|
actions:
|
||||||
- handler: syncUntracked
|
- handler: syncUntracked
|
||||||
|
@ -77,7 +77,7 @@ module.exports = {
|
|||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.config.sshPort || !_.isSafeInteger(this.config.sshPort) || this.config.sshPort <= 0) {
|
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
|
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 -p ${this.config.sshPort}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user