<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/send-pack.c, branch v2.4.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-04-20T22:28:31Z</updated>
<entry>
<title>Merge branch 'jc/push-cert'</title>
<updated>2015-04-20T22:28:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-20T22:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=268d5bc2b2a6f261c6da99c3c9557426468a765b'/>
<id>urn:sha1:268d5bc2b2a6f261c6da99c3c9557426468a765b</id>
<content type='text'>
The "git push --signed" protocol extension did not limit what the
"nonce" that is a server-chosen string can contain or how long it
can be, which was unnecessarily lax.  Limit both the length and the
alphabet to a reasonably small space that can still have enough
entropy.

* jc/push-cert:
  push --signed: tighten what the receiving end can ask to sign
</content>
</entry>
<entry>
<title>Merge branch 'sb/atomic-push'</title>
<updated>2015-04-02T19:34:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-02T19:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3c6151dad310db71f599dbfbac329fa961f29794'/>
<id>urn:sha1:3c6151dad310db71f599dbfbac329fa961f29794</id>
<content type='text'>
* sb/atomic-push:
  send-pack: unify error messages for unsupported capabilities
</content>
</entry>
<entry>
<title>push --signed: tighten what the receiving end can ask to sign</title>
<updated>2015-04-02T18:05:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-02T01:00:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afcb6ee30acf17f4e0338c49fbab301131abfbba'/>
<id>urn:sha1:afcb6ee30acf17f4e0338c49fbab301131abfbba</id>
<content type='text'>
Instead of blindly trusting the receiving side to give us a sensible
nonce to sign, limit the length (max 256 bytes) and the alphabet
(alnum and a few selected punctuations, enough to encode in base64)
that can be used in nonce.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-pack: unify error messages for unsupported capabilities</title>
<updated>2015-04-02T18:02:52Z</updated>
<author>
<name>Ralf Thielow</name>
<email>ralf.thielow@gmail.com</email>
</author>
<published>2015-04-02T17:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8b8f22aa97a94dbad4fb7d8dcb2c5bf21c4fa32'/>
<id>urn:sha1:c8b8f22aa97a94dbad4fb7d8dcb2c5bf21c4fa32</id>
<content type='text'>
If --signed is not supported, the error message names the remote
"receiving end". If --atomic is not supported, the error message
names the remote "server". Unify the naming to "receiving end"
as we're in the context of "push".

Signed-off-by: Ralf Thielow &lt;ralf.thielow@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/atomic-push'</title>
<updated>2015-02-11T21:43:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39fa6112ec8492f9300765e1f71e7c8ecfafc713'/>
<id>urn:sha1:39fa6112ec8492f9300765e1f71e7c8ecfafc713</id>
<content type='text'>
"git push" has been taught a "--atomic" option that makes push to
update more than one ref an "all-or-none" affair.

* sb/atomic-push:
  Document receive.advertiseatomic
  t5543-atomic-push.sh: add basic tests for atomic pushes
  push.c: add an --atomic argument
  send-pack.c: add --atomic command line argument
  send-pack: rename ref_update_to_be_sent to check_to_send_update
  receive-pack.c: negotiate atomic push support
  receive-pack.c: add execute_commands_atomic function
  receive-pack.c: move transaction handling in a central place
  receive-pack.c: move iterating over all commands outside execute_commands
  receive-pack.c: die instead of error in case of possible future bug
  receive-pack.c: shorten the execute_commands loop over all commands
</content>
</entry>
<entry>
<title>send-pack.c: add --atomic command line argument</title>
<updated>2015-01-08T03:56:44Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2015-01-08T03:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ff17f10c4297ab3d9948d4216016ca367e737e3'/>
<id>urn:sha1:4ff17f10c4297ab3d9948d4216016ca367e737e3</id>
<content type='text'>
This adds support to send-pack to negotiate and use atomic pushes
iff the server supports it. Atomic pushes are activated by a new command
line flag --atomic.

In order to do this we also need to change the semantics for send_pack()
slightly. The existing send_pack() function actually doesn't send all the
refs back to the server when multiple refs are involved, for example
when using --all. Several of the failure modes for pushes can already be
detected locally in the send_pack client based on the information from the
initial server side list of all the refs as generated by receive-pack.
Any such refs that we thus know would fail to push are thus pruned from
the list of refs we send to the server to update.

For atomic pushes, we have to deal thus with both failures that are detected
locally as well as failures that are reported back from the server. In order
to do so we treat all local failures as push failures too.

We introduce a new status code REF_STATUS_ATOMIC_PUSH_FAILED so we can
flag all refs that we would normally have tried to push to the server
but we did not due to local failures. This is to improve the error message
back to the end user to flag that "these refs failed to update since the
atomic push operation failed."

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-pack: rename ref_update_to_be_sent to check_to_send_update</title>
<updated>2015-01-08T03:56:44Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-01-08T03:23:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7582e9397c5b49de10a138a4f477a38b4ed1b3ab'/>
<id>urn:sha1:7582e9397c5b49de10a138a4f477a38b4ed1b3ab</id>
<content type='text'>
This renames ref_update_to_be_sent to check_to_send_update and inverts
the meaning of the return value. Having the return value inverted we
can have different values for the error codes. This is useful in a
later patch when we want to know if we hit the CHECK_REF_STATUS_REJECTED
case.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-objects: use --objects-edge-aggressive for shallow repos</title>
<updated>2014-12-29T17:58:25Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2014-12-24T23:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2dacf26d0985521c0f30e535963a45257b63ea21'/>
<id>urn:sha1:2dacf26d0985521c0f30e535963a45257b63ea21</id>
<content type='text'>
When fetching into or pushing from a shallow repository, we want to
aggressively mark edges as uninteresting, since this decreases the pack
size.  However, aggressively marking edges can negatively affect
performance on large non-shallow repositories with lots of refs.

Teach pack-objects a --shallow option to indicate that we're pushing
from or fetching into a shallow repository.  Use
--objects-edge-aggressive only for shallow repositories and otherwise
use --objects-edge, which performs better in the general case.  Update
the callers to pass the --shallow option when they are dealing with a
shallow repository.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/push-cert'</title>
<updated>2014-10-08T20:05:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-08T20:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fb06b5280ea05d75515fa780cf08d4ec9d6fe101'/>
<id>urn:sha1:fb06b5280ea05d75515fa780cf08d4ec9d6fe101</id>
<content type='text'>
Allow "git push" request to be signed, so that it can be verified and
audited, using the GPG signature of the person who pushed, that the
tips of branches at a public repository really point the commits
the pusher wanted to, without having to "trust" the server.

* jc/push-cert: (24 commits)
  receive-pack::hmac_sha1(): copy the entire SHA-1 hash out
  signed push: allow stale nonce in stateless mode
  signed push: teach smart-HTTP to pass "git push --signed" around
  signed push: fortify against replay attacks
  signed push: add "pushee" header to push certificate
  signed push: remove duplicated protocol info
  send-pack: send feature request on push-cert packet
  receive-pack: GPG-validate push certificates
  push: the beginning of "git push --signed"
  pack-protocol doc: typofix for PKT-LINE
  gpg-interface: move parse_signature() to where it should be
  gpg-interface: move parse_gpg_output() to where it should be
  send-pack: clarify that cmds_sent is a boolean
  send-pack: refactor inspecting and resetting status and sending commands
  send-pack: rename "new_refs" to "need_pack_data"
  receive-pack: factor out capability string generation
  send-pack: factor out capability string generation
  send-pack: always send capabilities
  send-pack: refactor decision to send update per ref
  send-pack: move REF_STATUS_REJECT_NODELETE logic a bit higher
  ...
</content>
</entry>
<entry>
<title>signed push: fortify against replay attacks</title>
<updated>2014-09-17T21:27:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-08-21T23:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b89363e4a5277038629491f8765c0598f366326c'/>
<id>urn:sha1:b89363e4a5277038629491f8765c0598f366326c</id>
<content type='text'>
In order to prevent a valid push certificate for pushing into an
repository from getting replayed in a different push operation, send
a nonce string from the receive-pack process and have the signer
include it in the push certificate.  The receiving end uses an HMAC
hash of the path to the repository it serves and the current time
stamp, hashed with a secret seed (the secret seed does not have to
be per-repository but can be defined in /etc/gitconfig) to generate
the nonce, in order to ensure that a random third party cannot forge
a nonce that looks like it originated from it.

The original nonce is exported as GIT_PUSH_CERT_NONCE for the hooks
to examine and match against the value on the "nonce" header in the
certificate to notice a replay, but returned "nonce" header in the
push certificate is examined by receive-pack and the result is
exported as GIT_PUSH_CERT_NONCE_STATUS, whose value would be "OK"
if the nonce recorded in the certificate matches what we expect, so
that the hooks can more easily check.

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