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
b1c7edac
Unverified
Commit
b1c7edac
authored
Feb 02, 2020
by
wallrick
Committed by
GitHub
Feb 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
f4e3fd09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
definition.yml
server/modules/storage/git/definition.yml
+6
-0
storage.js
server/modules/storage/git/storage.js
+4
-1
No files found.
server/modules/storage/git/definition.yml
View file @
b1c7edac
...
...
@@ -93,6 +93,12 @@ props:
default
:
'
'
hint
:
Optional - Absolute path to the Git binary, when not available in PATH. Leave empty to use the default PATH location (recommended).
order
:
50
sshPort
:
type
:
Number
title
:
SSH Port
default
:
22
hint
:
Optional - SSH Authentication Only - Allows overriding ssh default port.
order
:
60
actions
:
-
handler
:
syncUntracked
label
:
Add Untracked Changes
...
...
server/modules/storage/git/storage.js
View file @
b1c7edac
...
...
@@ -77,7 +77,10 @@ module.exports = {
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...'
)
await
this
.
git
.
addRemote
(
'origin'
,
this
.
config
.
repoUrl
)
break
...
...
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