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
438f1485
Commit
438f1485
authored
Apr 27, 2019
by
Nick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle git basic auth URl format (#814)
parent
26c7d49a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
storage.js
server/modules/storage/git/storage.js
+8
-2
No files found.
server/modules/storage/git/storage.js
View file @
438f1485
...
...
@@ -109,8 +109,14 @@ module.exports = {
await
this
.
git
.
addRemote
(
'origin'
,
this
.
config
.
repoUrl
)
break
default
:
WIKI
.
logger
.
info
(
'(STORAGE/GIT) Adding origin remote via HTTPS...'
)
await
this
.
git
.
addRemote
(
'origin'
,
`https://
${
this
.
config
.
basicUsername
}
:
${
this
.
config
.
basicPassword
}
@
${
this
.
config
.
repoUrl
}
`
)
WIKI
.
logger
.
info
(
'(STORAGE/GIT) Adding origin remote via HTTP/S...'
)
let
originUrl
=
''
if
(
_
.
startsWith
(
this
.
config
.
repoUrl
,
'http'
))
{
originUrl
=
originUrl
.
replace
(
'://'
,
`://
${
this
.
config
.
basicUsername
}
:
${
this
.
config
.
basicPassword
}
@`
)
}
else
{
originUrl
=
`https://
${
this
.
config
.
basicUsername
}
:
${
this
.
config
.
basicPassword
}
@
${
this
.
config
.
repoUrl
}
`
}
await
this
.
git
.
addRemote
(
'origin'
,
)
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