Example usage for org.eclipse.jgit.transport NetRCCredentialsProvider install

List of usage examples for org.eclipse.jgit.transport NetRCCredentialsProvider install

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport NetRCCredentialsProvider install.

Prototype

public static void install() 

Source Link

Document

Install default provider for the .netrc parser.

Usage

From source file:org.codehaus.mojo.versions.BumpMojo.java

License:Apache License

public void init() throws MojoExecutionException {
    try {//from ww  w  .  ja  v a 2  s . c  om
        NetRCCredentialsProvider.install();

        FileRepositoryBuilder builder = new FileRepositoryBuilder();
        Repository repository = builder.findGitDir().readEnvironment().findGitDir().build();
        git = new Git(repository);
    } catch (IOException e) {
        throw new MojoExecutionException(e.getMessage(), e);
    }
}