<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http.c, branch v1.7.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.11</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.11'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2012-04-30T22:45:51Z</updated>
<entry>
<title>remove superfluous newlines in error messages</title>
<updated>2012-04-30T22:45:51Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2012-04-30T00:28:45Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=82247e9bd5f7c90c4eac9674fb7518845cd3e432'/>
<id>urn:sha1:82247e9bd5f7c90c4eac9674fb7518845cd3e432</id>
<content type='text'>
The error handling routines add a newline.  Remove
the duplicate ones in error messages.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: use newer curl options for setting credentials</title>
<updated>2012-04-14T23:04:25Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-04-13T06:19:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6f4c347ca1d3102d77e2dd36b6bc8ab12de6045b'/>
<id>urn:sha1:6f4c347ca1d3102d77e2dd36b6bc8ab12de6045b</id>
<content type='text'>
We give the username and password to curl by sticking them
in a buffer of the form "user:pass" and handing the result
to CURLOPT_USERPWD. Since curl 7.19.1, there is a split
mechanism, where you can specify each element individually.

This has the advantage that a username can contain a ":"
character. It also is less code for us, since we can hand
our strings over to curl directly. And since curl 7.17.0 and
higher promise to copy the strings for us, we we don't even
have to worry about memory ownership issues.

Unfortunately, we have to keep the ugly code for old curl
around, but as it is now nicely #if'd out, we can easily get
rid of it when we decide that 7.19.1 is "old enough".

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: clean up leak in init_curl_http_auth</title>
<updated>2012-04-14T23:04:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-04-13T06:18:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=aa0834a04e1d9d3ab81ecd4a4a138233e6e234ed'/>
<id>urn:sha1:aa0834a04e1d9d3ab81ecd4a4a138233e6e234ed</id>
<content type='text'>
When we have a credential to give to curl, we must copy it
into a "user:pass" buffer and then hand the buffer to curl.
Old versions of curl did not copy the buffer, and we were
expected to keep it valid. Newer versions of curl will copy
the buffer.

Our solution was to use a strbuf and detach it, giving
ownership of the resulting buffer to curl. However, this
meant that we were leaking the buffer on newer versions of
curl, since curl was just copying it and throwing away the
string we passed. Furthermore, when we replaced a
credential (e.g., because our original one was rejected), we
were also leaking on both old and new versions of curl.

This got even worse in the last patch, which started
replacing the credential (and thus leaking) on every http
request.

Instead, let's use a static buffer to make the ownership
more clear and less leaky.  We already keep a static "struct
credential", so we are only handling a single credential at
a time, anyway.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fix http auth with multiple curl handles</title>
<updated>2012-04-10T16:12:13Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-04-10T09:53:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=dfa1725a3ec57098637b698ffc2b2e2459acc518'/>
<id>urn:sha1:dfa1725a3ec57098637b698ffc2b2e2459acc518</id>
<content type='text'>
HTTP authentication is currently handled by get_refs and fetch_ref, but
not by fetch_object, fetch_pack or fetch_alternates. In the
single-threaded case, this is not an issue, since get_refs is always
called first. It recognigzes the 401 and prompts the user for
credentials, which will then be used subsequently.

If the curl multi interface is used, however, only the multi handle used
by get_refs will have credentials configured. Requests made by other
handles fail with an authentication error.

Fix this by setting CURLOPT_USERPWD whenever a slot is requested.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>correct spelling: an URL -&gt; a URL</title>
<updated>2012-03-28T15:47:23Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2012-03-28T08:41:54Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a7793a749115ead3b8f7447ce1e96572ea5d8ea3'/>
<id>urn:sha1:a7793a749115ead3b8f7447ce1e96572ea5d8ea3</id>
<content type='text'>
Signed-off-by: Jim Meyering &lt;meyering@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: support proxies that require authentication</title>
<updated>2012-03-02T22:40:14Z</updated>
<author>
<name>Nelson Benitez Leon</name>
<email>nelsonjesus.benitez@seap.minhap.es</email>
</author>
<published>2012-03-02T13:55:57Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=dd6139971a18e25a5089c0f96dc80e454683ef0b'/>
<id>urn:sha1:dd6139971a18e25a5089c0f96dc80e454683ef0b</id>
<content type='text'>
When the proxy server specified by the http.proxy configuration or the
http_proxy environment variable requires authentication, git failed to
connect to the proxy, because we did not configure the cURL handle with
CURLOPT_PROXYAUTH.

When a proxy is in use, and you tell git that the proxy requires
authentication by having username in the http.proxy configuration, an
extra request needs to be made to the proxy to find out what
authentication method it supports, as this patch uses CURLAUTH_ANY to let
the library pick the most secure method supported by the proxy server.

The extra round-trip adds extra latency, but relieves the user from the
burden to configure a specific authentication method.  If it becomes
problem, a later patch could add a configuration option to specify what
method to use, but let's start simple for the time being.

Signed-off-by: Nelson Benitez Leon &lt;nbenitezl@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-push-over-dav'</title>
<updated>2011-12-20T00:05:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-20T00:05:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1d3a035d6d48bfa870b6ebe7c59f12b66e3a1b1c'/>
<id>urn:sha1:1d3a035d6d48bfa870b6ebe7c59f12b66e3a1b1c</id>
<content type='text'>
* jk/maint-push-over-dav:
  http-push: enable "proactive auth"
  t5540: test DAV push with authentication

Conflicts:
	http.c
</content>
</entry>
<entry>
<title>Merge branch 'jk/credentials'</title>
<updated>2011-12-20T00:05:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-20T00:05:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=367d20ec6b9e8e297537f665fb528346bd0aff27'/>
<id>urn:sha1:367d20ec6b9e8e297537f665fb528346bd0aff27</id>
<content type='text'>
* jk/credentials:
  t: add test harness for external credential helpers
  credentials: add "store" helper
  strbuf: add strbuf_add*_urlencode
  Makefile: unix sockets may not available on some platforms
  credentials: add "cache" helper
  docs: end-user documentation for the credential subsystem
  credential: make relevance of http path configurable
  credential: add credential.*.username
  credential: apply helper config
  http: use credential API to get passwords
  credential: add function for parsing url components
  introduce credentials API
  t5550: fix typo
  test-lib: add test_config_global variant

Conflicts:
	strbuf.c
</content>
</entry>
<entry>
<title>http-push: enable "proactive auth"</title>
<updated>2011-12-14T00:34:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-12-14T00:11:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a4ddbc33d7906f0e10c68c140a9a1003d9715a77'/>
<id>urn:sha1:a4ddbc33d7906f0e10c68c140a9a1003d9715a77</id>
<content type='text'>
Before commit 986bbc08, 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
986bbc08 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 986bbc08 for
details).

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 &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: use credential API to get passwords</title>
<updated>2011-12-12T07:16:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-12-10T10:31:21Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=148bb6a7b4d82a6380c6a51951b870933564c115'/>
<id>urn:sha1:148bb6a7b4d82a6380c6a51951b870933564c115</id>
<content type='text'>
This patch converts the http code to use the new credential
API, both for http authentication as well as for getting
certificate passwords.

Most of the code change is simply variable naming (the
passwords are now contained inside the credential struct)
or deletion of obsolete code (the credential code handles
URL parsing and prompting for us).

The behavior should be the same, with one exception: the
credential code will prompt with a description based on the
credential components. Therefore, the old prompt of:

  Username for 'example.com':
  Password for 'example.com':

now looks like:

  Username for 'https://example.com/repo.git':
  Password for 'https://user@example.com/repo.git':

Note that we include more information in each line,
specifically:

  1. We now include the protocol. While more noisy, this is
     an important part of knowing what you are accessing
     (especially if you care about http vs https).

  2. We include the username in the password prompt. This is
     not a big deal when you have just been prompted for it,
     but the username may also come from the remote's URL
     (and after future patches, from configuration or
     credential helpers).  In that case, it's a nice
     reminder of the user for which you're giving the
     password.

  3. We include the path component of the URL. In many
     cases, the user won't care about this and it's simply
     noise (i.e., they'll use the same credential for a
     whole site). However, that is part of a larger
     question, which is whether path components should be
     part of credential context, both for prompting and for
     lookup by storage helpers. That issue will be addressed
     as a whole in a future patch.

Similarly, for unlocking certificates, we used to say:

  Certificate Password for 'example.com':

and we now say:

  Password for 'cert:///path/to/certificate':

Showing the path to the client certificate makes more sense,
as that is what you are unlocking, not "example.com".

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
