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

Re: How to redirect git std input in Python?

From
Jeff King <peff@peff.net>
Date
Dec 6, 2019, 02:40 UTC
Message-ID
<20191206024050.GA1223222@coredump.intra.peff.net>
In-Reply-To
<f3b45643-6ca5-4f7f-aec2-8438d1451629.kan.wu@genetalks.com>
On Fri, Dec 06, 2019 at 09:34:30AM +0800, 吴侃 wrote:
> To: gitster <gitster@pobox.com>, peff <peff@peff.net>

Please send questions to the public mailing list at git@vger.kernel.org. Then more people will see your question, and everyone will benefit from seeing the answer.

Show 5 quoted lines
> I want to develop a git plugin in a Python IDE.when i clone a private
> git project,it needs to input username and passward in terminal.
> [...]
> so i want to redirect the username or password input to a dialog use
> Python in my plugin.

Look into either the GIT_ASKPASS environment variable described in "git help git", or if you want something a little nicer, the credential subsystem (described in https://git-scm.com/docs/gitcredentials, but especially the "custom helpers" part at the end).

-Peff
Message 1 of 1 in “Re: How to redirect git std input in Python?”
  1. Jeff KingDec 6, 2019

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.