Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
6a00a5db
Commit
6a00a5db
authored
Apr 19, 2020
by
NGPixel
Committed by
Nicolas Giard
Apr 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: git ssh port incorrect default value
parent
7cd5721c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
admin-utilities-importv1.vue
client/components/admin/admin-utilities-importv1.vue
+11
-1
storage.js
server/modules/storage/git/storage.js
+1
-1
No files found.
client/components/admin/admin-utilities-importv1.vue
View file @
6a00a5db
...
...
@@ -44,7 +44,7 @@
hide-details
color='primary'
)
v-col(
cols='
8')
v-col(
:cols='gitAuthMode === `ssh` ? 6 :
8')
v-text-field(
outlined
label='Repository URL'
...
...
@@ -52,6 +52,14 @@
hide-details
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-text-field(
label='Branch'
...
...
@@ -296,6 +304,7 @@ export default {
],
gitVerifySSL
:
true
,
gitRepoUrl
:
''
,
gitRepoPort
:
22
,
gitRepoBranch
:
'master'
,
gitPrivKey
:
''
,
gitUsername
:
''
,
...
...
@@ -387,6 +396,7 @@ export default {
{
key
:
'authType'
,
value
:
{
value
:
this
.
gitAuthMode
}
},
{
key
:
'repoUrl'
,
value
:
{
value
:
this
.
gitRepoUrl
}
},
{
key
:
'branch'
,
value
:
{
value
:
this
.
gitRepoBranch
}
},
{
key
:
'sshPort'
,
value
:
{
value
:
this
.
gitRepoPort
}
},
{
key
:
'sshPrivateKeyMode'
,
value
:
{
value
:
'contents'
}
},
{
key
:
'sshPrivateKeyPath'
,
value
:
{
value
:
''
}
},
{
key
:
'sshPrivateKeyContent'
,
value
:
{
value
:
this
.
gitPrivKey
}
},
...
...
server/modules/storage/git/storage.js
View file @
6a00a5db
...
...
@@ -77,7 +77,7 @@ module.exports = {
throw
err
}
}
if
(
this
.
config
.
sshPort
<=
0
)
{
if
(
!
this
.
config
.
sshPort
||
!
_
.
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
}
`
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment