Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-git4clone
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tool
spring-boot-git4clone
Commits
8ad75f6b
Commit
8ad75f6b
authored
Jul 12, 2021
by
wuxixi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改复制到本地的空格问题
parent
8c28637c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
src/main/java/xyz/rexlin600/gitlab/util/GitlabUtil.java
+5
-1
No files found.
src/main/java/xyz/rexlin600/gitlab/util/GitlabUtil.java
View file @
8ad75f6b
...
...
@@ -34,6 +34,8 @@ public class GitlabUtil {
*/
public
static
void
clone
(
GitlabCloneReq
req
,
UsernamePasswordCredentialsProvider
provider
,
GitlabProject
project
,
CountDownLatch
countDownLatch
)
{
CloneCommand
cloneCommand
=
Git
.
cloneRepository
();
String
dir
=
req
.
getDir
()
+
"/"
+
project
.
getNameWithNamespace
();
dir
=
dir
.
replace
(
" "
,
""
);
try
{
Git
git
=
cloneCommand
.
setURI
(
project
.
getHttpUrl
())
...
...
@@ -61,11 +63,13 @@ public class GitlabUtil {
}
}
})
.
setDirectory
(
new
File
(
req
.
getDir
()
+
"/"
+
project
.
getNameWithNamespace
()
))
.
setDirectory
(
new
File
(
dir
))
.
setCredentialsProvider
(
provider
)
.
call
();
}
catch
(
Exception
ex
)
{
// 克隆失败则打印错误日志、计数器-1
ex
.
printStackTrace
();
log
.
error
(
"<== 克隆项目=【{}】失败,原因=【{}】"
,
project
.
getName
(),
ex
.
getMessage
());
countDownLatch
.
countDown
();
}
...
...
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