Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Validating the git credentials of the user

Hello Everyone!!

I am writing an application in which we will support git integration using jgit. The user will provide us with his git credentials so that we can push some files on his git.

The git credentials which user will supply can be

  1. The Account URL, eg: https://github.com/OpenPrinting
  2. HTTP (Username and Password/ Kerberos)
  3. SSH

Before saving the user credentials I want to validate that the credentials entered is valid.

The user might be using GitHub/BitBucket/GitLab. I am trying to find some git command or some way using jgit which I can use to validate the credentials. Can you please point me to some command/logic which I can try?

What I have tried? 
I tried git ls-remote command, but it requires the repo name/ repo url. The user won't specify the repository name or URL beforehand at the time of testing. Because of which I am not able to use this command.


Thanks
Deepak


Back to the top