Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] [egit-dev] Getting permission when using the push command

On Tue, Jan 11, 2011 at 00:30, Jan Finis <finis@xxxxxxxxx> wrote:
> this question is related to using JGit. But I guess this is the same mailing
> list?

Actually its jgit-dev@xxxxxxxxxxx.

> I tried using the Git class with its push command to make a push in java
> code. However, I cannot state a password, so I get a TransportException
> telling me that I am not authorized.
>
> So how can I set username and password for a git push command that was
> created with the Git class? Username can be encoded into the remote string,
> but not the password...

Right now you can't.  The PushCommand class is missing a way to obtain
and pass through a CredentialsProvider to the underlying Transport
instances that it will open.  You would need to use the Transport
class directly.

-- 
Shawn.


Back to the top