|
@@ -126,6 +126,14 @@
|
|
|
placeholder="请填写 RSA 私钥"
|
|
placeholder="请填写 RSA 私钥"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="RSA 公钥" prop="rsaPubkey">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="form.rsaPubkey"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :autosize="{ minRows: 4 }"
|
|
|
|
|
+ placeholder="请填写 RSA 公钥"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else-if="form.authType === 'http'">
|
|
<div v-else-if="form.authType === 'http'">
|
|
|
<el-form-item label="用户名" prop="username">
|
|
<el-form-item label="用户名" prop="username">
|
|
@@ -177,7 +185,8 @@ export default {
|
|
|
type: 'git',
|
|
type: 'git',
|
|
|
username: '',
|
|
username: '',
|
|
|
password: '',
|
|
password: '',
|
|
|
- rsaPrikey: ''
|
|
|
|
|
|
|
+ rsaPrikey: '',
|
|
|
|
|
+ rsaPubkey: '',
|
|
|
},
|
|
},
|
|
|
repoTypes: [],
|
|
repoTypes: [],
|
|
|
authTypes: []
|
|
authTypes: []
|
|
@@ -193,6 +202,7 @@ export default {
|
|
|
// 根据选择的类型增加特定规则
|
|
// 根据选择的类型增加特定规则
|
|
|
if (this.form.authType === 'ssh') {
|
|
if (this.form.authType === 'ssh') {
|
|
|
baseRules.rsaPrikey = [{ required: true, message: 'ssh 认证类型必须填写 RSA 私钥', trigger: 'blur' }]
|
|
baseRules.rsaPrikey = [{ required: true, message: 'ssh 认证类型必须填写 RSA 私钥', trigger: 'blur' }]
|
|
|
|
|
+ baseRules.rsaPubkey = [{ required: true, message: 'ssh 认证类型必须填写 RSA 公钥', trigger: 'blur' }]
|
|
|
} else if (this.form.authType === 'http') {
|
|
} else if (this.form.authType === 'http') {
|
|
|
baseRules.username = [{ required: true, message: 'http 认证类型必须填写 username', trigger: 'blur' }]
|
|
baseRules.username = [{ required: true, message: 'http 认证类型必须填写 username', trigger: 'blur' }]
|
|
|
baseRules.password = [{ required: true, message: 'http 认证类型必须填写 password', trigger: 'blur' }]
|
|
baseRules.password = [{ required: true, message: 'http 认证类型必须填写 password', trigger: 'blur' }]
|