saltstack/salt — pull request #11964 by scoates (2014-04-13 20:13:49+00:00)
Title: Allow multiple identities for git

Sometimes, multiple private keys must be tried in order to get git
clone/pull/rebase to play nicely with a ssh connection. This patch
allows for this by allowing identities to be a list (but casting if it's
not).

A good example of this is when using private repositories that contain
submodules. GitHub does not allow the use of one key on multiple
repositories.

One small drawback is that there's not really a way to specify this
directly to git with the way the helper function works, so it just tries
them all until it succeeds.

Note: I'm going to try to drop by the sprint at PyCon tomorrow (Monday); we can discuss then if that's easier.
Here's a demo repository for states, including links to protected repositories, and their keys:
https://github.com/scoates/salt-multi-identity-git-states