Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » When to Use setCredentialsProvider
When to Use setCredentialsProvider [message #759451] Mon, 28 November 2011 17:31 Go to next message
Hardik Shah is currently offline Hardik ShahFriend
Messages: 7
Registered: November 2011
Junior Member
Currently I am using pull operation on file base protocol Git workspace so it does not require any credentials to set.

Now I observed this method , so can you please help me In which operations and which type of shared GIT repository protocol require to set credentials.


Thanks,
Hardik Shah
Re: When to Use setCredentialsProvider [message #759657 is a reply to message #759451] Tue, 29 November 2011 14:14 Go to previous messageGo to next message
Hardik Shah is currently offline Hardik ShahFriend
Messages: 7
Registered: November 2011
Junior Member
Regarding this I found one issue.

I had java application on 'Windows System A', I am pulling from remote repository from 'Windows System B'

For pulling I am using following code.

PullCommand pull = git.pull();
pull.setCredentialsProvider(new UsernamePasswordCredentialsProvider(userName, password));
pull.call();

Now if before running program on 'Windows System A', if I had not open 'Windows System B's shared location then that program fail and throws following error

InvalidRemoteException

But If I open 'Windows System B''s shared location once on 'Windows System A', and then run program then it run successfully.

The way I am setting credentials is not working, so can you please guide me?

Thanks,
Hardik
Re: When to Use setCredentialsProvider [message #759781 is a reply to message #759657] Wed, 30 November 2011 02:16 Go to previous message
Hardik Shah is currently offline Hardik ShahFriend
Messages: 7
Registered: November 2011
Junior Member
In addition to my last comment.

I am testing that scenario in file protocol,

and also that issue occurs when if we open 'Windows System B' shared location on 'Windows System A' and it asks for user name and password and if we do not enter so that means user name and password is not saved or cached on that machine and then run java application.

Thanks,
Hardik Shah
Previous Topic:CloneCommand doesnt extrtact downloaded files
Next Topic:question about ReceivePck
Goto Forum:
  


Current Time: Fri Mar 29 02:22:09 GMT 2024

Powered by FUDForum. Page generated in 0.02476 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top