This commit is contained in:
Marcin Grzejszczak
2017-10-03 17:22:17 +02:00
parent 1056c7d942
commit 9b4ee920c7
2 changed files with 5 additions and 2 deletions

View File

@@ -330,6 +330,7 @@ class GitRepo {
log.info("Passed username and password - will set a custom credentials provider");
this.provider = credentialsProvider(releaserProperties);
} else {
log.info("No custom credentials provider will be set");
this.provider = null;
}
}
@@ -353,7 +354,9 @@ class GitRepo {
};
CloneCommand getCloneCommandByCloneRepository() {
return Git.cloneRepository().setTransportConfigCallback(this.callback);
return Git.cloneRepository()
.setCredentialsProvider(this.provider)
.setTransportConfigCallback(this.callback);
}
PushCommand push(Git git) {

View File

@@ -95,6 +95,6 @@ public class ProjectGitHandler {
}
GitRepo gitRepo(File workingDir) {
return new GitRepo(workingDir);
return new GitRepo(workingDir, this.properties);
}
}