This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 3acd511e authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Nochmal Sonar

parent 1fb42780
Branches
Tags
1 merge request!67Bereitstellung für August Release
......@@ -11,6 +11,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
......@@ -346,11 +347,12 @@ public class GitlabService {
* to use the provided OAuth2 token
*/
public void setJGitDefaultAuth() {
if(tokenProvider.getGitLabAccessToken().isPresent()) {
CredentialsProvider.setDefault(new UsernamePasswordCredentialsProvider("oauth2", tokenProvider.getGitLabAccessToken().get()));
} else {
log.error("Cannot find gitlab token!");
}
final Optional<String> gitLabAccessToken = tokenProvider.getGitLabAccessToken();
if (gitLabAccessToken.isPresent()) {
CredentialsProvider.setDefault(new UsernamePasswordCredentialsProvider("oauth2", gitLabAccessToken.get()));
} else {
log.error("Cannot find gitlab token!");
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment