Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] [Support] JGit requires authentication but git on the command-line doesn't

Hi, 

Could you please help with the following: 

I'm using JGit to commit and push changes in a git repository. It seems like the command git push on the command line is different from git.push().call() in JGit

git push asks me for the first time to enter credentials. When I run it again, it doesn't
This is because my installation of git is configured like: git config --global credential.helper wincred

JGit however fails with the error: "Authentication is required but no CredentialsProvider has been registered" 
Which CredentialsProvider should I use for this case? None of the available CredentialsProviders (UsernamePasswordCredentialsProvider, ConsoleCredentialsProvider) suit my needs


My last resort would be to fork a process "git push" if JGit is unable to use the cached credentials

Please advise! 

Thanks in advance, 

Back to the top