The analogue of Git Credentials in JGit is the interface CredentialsProvider. All commands that establish connections to remote repositories can be configured with an instance CredentialsProvider. They are inherited from TransportCommandwhich there is a method setCredentialsProvider.
source
share