开发者

How to ForwardAgent yes using fabric?

开发者 https://www.devze.com 2023-04-12 19:36 出处:网络
I am successfully run()ning commands on remote 开发者_如何学JAVAserver with my private key pair.

I am successfully run()ning commands on remote 开发者_如何学JAVAserver with my private key pair.

However, I'd like to do git clone ssh://private/repo on remote server using my local key (or using local ssh agent I'm in).

How to do it using fabric?


Since version 1.4 fabric has environment option that enables agent forwarding.

env.forward_agent = True

UPD: This feature was buggy before fabric 1.4.2


The short answer is that fabric uses a forked version of paramiko and that paramiko doesn't support ssh agent forwarding.

The long answer is that there are issues for this both for fabric and paramiko. Even there's a comment in the fabric issue that contains links to a fork of both fabric and the forked paramiko version with ssh forwarding support. Hence, if you want to make use of that feature you'll need to get the latest version from there or wait for a while until it's officially released.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号