Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Dec 14, 2011

  1. Jeff King

    http-push: enable "proactive auth"

    Before commit 986bbc0, git was proactive about asking for
    http passwords. It assumed that if you had a username in
    your URL, you would also want a password, and asked for it
    before making any http requests.
    However, this could interfere with the use of .netrc (see
    986bbc0 for details). And it was also unnecessary, since
    the http fetching code had learned to recognize an HTTP 401
    and prompt the user then. Furthermore, the proactive prompt
    could interfere with the usage of .netrc (see 986bbc0 for
    Unfortunately, the http push-over-DAV code never learned to
    recognize HTTP 401, and so was broken by this change. This
    patch does a quick fix of re-enabling the "proactive auth"
    strategy only for http-push, leaving the dumb http fetch and
    smart-http as-is.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
    peff authored gitster committed

Oct 16, 2011

  1. Jeff King

    http_init: accept separate URL parameter

    The http_init function takes a "struct remote". Part of its
    initialization procedure is to look at the remote's url and
    grab some auth-related parameters. However, using the url
    included in the remote is:
      - wrong; the remote-curl helper may have a separate,
        unrelated URL (e.g., from remote.*.pushurl). Looking at
        the remote's configured url is incorrect.
      - incomplete; http-fetch doesn't have a remote, so passes
        NULL. So http_init never gets to see the URL we are
        actually going to use.
      - cumbersome; http-push has a similar problem to
        http-fetch, but actually builds a fake remote just to
        pass in the URL.
    Instead, let's just add a separate URL parameter to
    http_init, and all three callsites can pass in the
    appropriate information.
    Signed-off-by: Jeff King <>
    Signed-off-by: Junio C Hamano <>
    peff authored gitster committed
Something went wrong with that request. Please try again.