git/list[1] front-page[2] threads[3] people[4] search[5] about
 

How to Verify the Git Credentials supplied by the User

From
DPDeepak Patankar <patankardeepak04@gmail.com>
Date
Oct 12, 2020, 13:50 UTC
Message-ID
<CABmmNJOGBdEO+AT0_8dSwmFxomFE7A5x354+YgfxiU5N+mOroA@mail.gmail.com>
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

Next: Junio C Hamano
Message 1 of 4 in “How to Verify the Git Credentials supplied by the User”
  1. Deepak PatankarOct 12, 2020
  2. Junio C HamanoOct 12, 2020
  3. Deepak PatankarOct 13, 2020
  4. Junio C HamanoOct 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.