Created
January 26, 2011 19:49
-
-
Save binarymatt/797304 to your computer and use it in GitHub Desktop.
my slightly modified version of http://lincolnloop.com/blog/2009/sep/22/easy-fabric-deployment-part-1-gitmercurial-and-ssh/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sshagent_run(cmd): | |
""" | |
Helper function. | |
Runs a command with SSH agent forwarding enabled. | |
Note:: Fabric (and paramiko) can't forward your SSH agent. | |
This helper uses your system's ssh to do so. | |
""" | |
host = api.env.host_string | |
result = api.local('ssh -A %s "%s"' % (host, cmd)) | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment