fix: remove ssh port param for git module
This commit is contained in:
parent
c15d1a4967
commit
b2931471c0
@ -44,7 +44,7 @@
|
|||||||
hide-details
|
hide-details
|
||||||
color='primary'
|
color='primary'
|
||||||
)
|
)
|
||||||
v-col(:cols='gitAuthMode === `ssh` ? 6 : 8')
|
v-col(cols='8')
|
||||||
v-text-field(
|
v-text-field(
|
||||||
outlined
|
outlined
|
||||||
label='Repository URL'
|
label='Repository URL'
|
||||||
@ -52,14 +52,6 @@
|
|||||||
hide-details
|
hide-details
|
||||||
v-model='gitRepoUrl'
|
v-model='gitRepoUrl'
|
||||||
)
|
)
|
||||||
v-col(v-if='gitAuthMode === `ssh`', cols='2')
|
|
||||||
v-text-field(
|
|
||||||
label='Port'
|
|
||||||
placeholder='e.g. 22'
|
|
||||||
v-model='gitRepoPort'
|
|
||||||
outlined
|
|
||||||
hide-details
|
|
||||||
)
|
|
||||||
v-col(cols='4')
|
v-col(cols='4')
|
||||||
v-text-field(
|
v-text-field(
|
||||||
label='Branch'
|
label='Branch'
|
||||||
@ -304,7 +296,6 @@ export default {
|
|||||||
],
|
],
|
||||||
gitVerifySSL: true,
|
gitVerifySSL: true,
|
||||||
gitRepoUrl: '',
|
gitRepoUrl: '',
|
||||||
gitRepoPort: 22,
|
|
||||||
gitRepoBranch: 'master',
|
gitRepoBranch: 'master',
|
||||||
gitPrivKey: '',
|
gitPrivKey: '',
|
||||||
gitUsername: '',
|
gitUsername: '',
|
||||||
@ -396,7 +387,6 @@ export default {
|
|||||||
{ key: 'authType', value: { value: this.gitAuthMode } },
|
{ key: 'authType', value: { value: this.gitAuthMode } },
|
||||||
{ key: 'repoUrl', value: { value: this.gitRepoUrl } },
|
{ key: 'repoUrl', value: { value: this.gitRepoUrl } },
|
||||||
{ key: 'branch', value: { value: this.gitRepoBranch } },
|
{ key: 'branch', value: { value: this.gitRepoBranch } },
|
||||||
{ key: 'sshPort', value: { value: this.gitRepoPort } },
|
|
||||||
{ key: 'sshPrivateKeyMode', value: { value: 'contents' } },
|
{ key: 'sshPrivateKeyMode', value: { value: 'contents' } },
|
||||||
{ key: 'sshPrivateKeyPath', value: { value: '' } },
|
{ key: 'sshPrivateKeyPath', value: { value: '' } },
|
||||||
{ key: 'sshPrivateKeyContent', value: { value: this.gitPrivKey } },
|
{ key: 'sshPrivateKeyContent', value: { value: this.gitPrivKey } },
|
||||||
|
@ -93,12 +93,6 @@ 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 (22).
|
|
||||||
order: 60
|
|
||||||
actions:
|
actions:
|
||||||
- handler: syncUntracked
|
- handler: syncUntracked
|
||||||
label: Add Untracked Changes
|
label: Add Untracked Changes
|
||||||
|
@ -77,10 +77,7 @@ module.exports = {
|
|||||||
throw err
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.config.sshPort || (_.isString(this.config.sshPort) && _.isEmpty(this.config.sshPort.length)) || (_.isSafeInteger(this.config.sshPort) && this.config.sshPort <= 0)) {
|
await this.git.addConfig('core.sshCommand', `ssh -i "${this.config.sshPrivateKeyPath}" -o StrictHostKeyChecking=no`)
|
||||||
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