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

Re: Git ksshaskpass to play nice with https and kwallet

From
Jeff King <peff@peff.net>
Date
Oct 5, 2011, 18:01 UTC
Message-ID
<20111005180125.GC22962@sigill.intra.peff.net>
In-Reply-To
<20111005175536.GB22962@sigill.intra.peff.net>
On Wed, Oct 05, 2011 at 01:55:36PM -0400, Jeff King wrote:
Show 23 quoted lines
> On Tue, Oct 04, 2011 at 08:49:55PM +0200, Michael J Gruber wrote:
> 
> > We seem to mean something different:
> > 
> > git config --get remote.bitbucket.pushurl
> > https://grubix@bitbucket.org/grubix/git.git
> > SSH_ASKPASS= git push -n bitbucket
> > Username for 'bitbucket.org':
> > 
> > I mean that git should not need to ask for the username here.
> 
> No, we are in agreement about the intended behavior. I think you are
> seeing a bug. What version of git produced it?
> 
> With my http-auth series, I get:
> 
>   $ git push https://github.com/peff/git.git
>   Username for 'github.com':
> 
>   $ git push https://peff@github.com/peff/git.git
>   Password for 'github.com':
> 
> Using v1.7.7 produces similar results.
Hrm. I do get this, with the same version of git:
  $ git config remote.foo.url https://github.com/peff/git.git
  $ git push foo
  Username for 'github.com':
  $ git config remote.foo.url https://peff@github.com/peff/git.git
  $ git push foo
  Password for 'github.com':
So far so good. Now how about this:
  $ git config remote.foo.url https://github.com/peff/git.git
  $ git config remote.foo.pushurl https://peff@github.com/peff/git.git
  $ git push foo
  Username for 'github.com':

So I think the problem is with pushurl, not with the auth code. Oddly, though, running GIT_TRACE reveals:

  $ GIT_TRACE=1 git push foo
  trace: built-in: git 'push' 'foo'
  trace: run_command: 'git-remote-https' 'foo' 'https://peff@github.com/peff/git.git'

which is the right URL. So it's almost as if we are throwing away the passed URL in favor of the configuration, and then looking up the configuration wrong. I'm about to go get on a plane, so I don't have more time to look at it now, but I suspect it's something simple and stupid.

-Peff
Previous: Jeff KingNext: Michael J Gruber
Message 9 of 30 in “Git ksshaskpass to play nice with https and kwallet”
  1. Michael J GruberOct 4, 2011
  2. Jeff KingOct 4, 2011
  3. Michael J GruberOct 4, 2011
  4. Jeff KingOct 4, 2011
  5. Michael J GruberOct 4, 2011
  6. Jeff KingOct 4, 2011
  7. Michael J GruberOct 4, 2011
  8. Jeff KingOct 5, 2011
  9. Jeff KingOct 5, 2011
  10. Michael J GruberOct 6, 2011
  11. remote-curl: Obey passed URLMichael J Gruber, Oct 6, 2011
  12. Jeff KingOct 6, 2011
  13. Jeff KingOct 6, 2011
  14. Michael J GruberOct 12, 2011
  15. http_init: accept separate URL parameterJeff King, Oct 12, 2011
  16. Jeff KingOct 12, 2011
  17. Junio C HamanoOct 12, 2011
  18. Jeff KingOct 12, 2011
  19. Michael J GruberOct 13, 2011
  20. 0/6 http-auth-earlyMichael J Gruber, Oct 14, 2011
  21. Jeff KingOct 14, 2011
  22. Michael J GruberOct 14, 2011
  23. Junio C HamanoOct 14, 2011
  24. 1/6 url: decode buffers that are not NUL-terminatedMichael J Gruber, Oct 14, 2011
  25. 2/6 improve httpd auth testsMichael J Gruber, Oct 14, 2011
  26. 3/6 remote-curl: don't retry auth failures with dumb protocolMichael J Gruber, Oct 14, 2011
  27. 4/6 http: retry authentication failures for all http requestsMichael J Gruber, Oct 14, 2011
  28. 5/6 http: use hostname in credential descriptionMichael J Gruber, Oct 14, 2011
  29. 6/6 http_init: accept separate URL parameterMichael J Gruber, Oct 14, 2011
  30. Tay Ray ChuanOct 13, 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.