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

Re: How to provide authentication along with git command itself ?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 14, 2011, 20:02 UTC
Message-ID
<20110714200244.GA14687@elie>
In-Reply-To
<20110714163149.63bad937@shiva.selfip.org>
J. Bakshi wrote:
> Well, I am using version 1.7, hence not DAV but using git-http-backend 
Ah, I forgot to mention the docs for gitolite and http-backend[1].

As for your original question about how to set up or cache credentials, unfortunately I haven't tried it. Based on git-push(1), it looks like the usual

	http://username:pass@domain/path/to/repo

syntax should work if you're passing the full URL on the command line or if it's okay to store the usernames and passwords in plaintext in .git/config.

If that's not okay, it also might be possible to hack up something evil with the GIT_ASKPASS variable. Some of the patches mentioned in the recent discussion about password prompts also might be interesting[2].

Regards, Jonathan

[1] http://sitaramc.github.com/gitolite/doc/http-backend.html [2] http://thread.gmane.org/gmane.comp.version-control.git/176522

Previous: J. Bakshi
Message 7 of 7 in “How to provide authentication along with git command itself ?”
  1. J. BakshiJul 14, 2011
  2. Carlos Martín NietoJul 14, 2011
  3. J. BakshiJul 14, 2011
  4. Carlos Martín NietoJul 14, 2011
  5. Jon SeymourJul 14, 2011
  6. J. BakshiJul 14, 2011
  7. Jonathan NiederJul 14, 2011

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.