How to Verify the Git Credentials supplied by the User

From: Deepak Patankar <hidden>
Date: 2020-10-12 13:51:24

Hello!!

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

HTTP (Username and Password/ Kerberos)
SSH

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

The user might be using GithHub/BitBucket/GitLab. I am trying to find
some git command 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/url. In
one of our use case, the user won't specify the repository name
beforehand. Because of which I am not able to use this command.


Thanks
Deepak Patankar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help