Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » When to Use setCredentialsProvider
When to Use setCredentialsProvider [message #759451] Mon, 28 November 2011 12:31 Go to next message
Eclipse UserFriend
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 09:14 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 29 November 2011 21:16 Go to previous message
Eclipse UserFriend
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: Sat Jun 14 14:22:38 EDT 2025

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

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

Back to the top