Class GITCredentialsProvider


  • public class GITCredentialsProvider
    extends org.eclipse.jgit.transport.CredentialsProvider
    Git repository credentials provider. One credential provider created for all git instances.

    Git supports these protocols:

    • file://
    • ssh://
    • git://
    • https://
    See Also:
    JGit Authentication Explained, matez blog
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean get​(org.eclipse.jgit.transport.URIish uri, org.eclipse.jgit.transport.CredentialItem... items)  
      boolean isInteractive()  
      void reset​(org.eclipse.jgit.transport.URIish uri)  
      void setPredefinedCredentials​(java.lang.String url, java.lang.String predefinedUser, java.lang.String predefinedPass, java.lang.String predefinedFingerprint)  
      void setTeamSettings​(ProjectTeamSettings teamSettings)  
      boolean supports​(org.eclipse.jgit.transport.CredentialItem... items)  
      • Methods inherited from class org.eclipse.jgit.transport.CredentialsProvider

        get, getDefault, setDefault
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GITCredentialsProvider

        public GITCredentialsProvider()
    • Method Detail

      • setPredefinedCredentials

        public void setPredefinedCredentials​(java.lang.String url,
                                             java.lang.String predefinedUser,
                                             java.lang.String predefinedPass,
                                             java.lang.String predefinedFingerprint)
      • get

        public boolean get​(org.eclipse.jgit.transport.URIish uri,
                           org.eclipse.jgit.transport.CredentialItem... items)
                    throws org.eclipse.jgit.errors.UnsupportedCredentialItem
        Specified by:
        get in class org.eclipse.jgit.transport.CredentialsProvider
        Throws:
        org.eclipse.jgit.errors.UnsupportedCredentialItem
      • isInteractive

        public boolean isInteractive()
        Specified by:
        isInteractive in class org.eclipse.jgit.transport.CredentialsProvider
      • supports

        public boolean supports​(org.eclipse.jgit.transport.CredentialItem... items)
        Specified by:
        supports in class org.eclipse.jgit.transport.CredentialsProvider
      • reset

        public void reset​(org.eclipse.jgit.transport.URIish uri)
        Overrides:
        reset in class org.eclipse.jgit.transport.CredentialsProvider