0
私はfabric3(https://pypi.python.org/pypi/Fabric3)、つまりPython 3ポートのファブリックを扱っています。Fabricコマンドが特定のsshキーで動作しない
私はのgit - bashのを使用してwin7の中でローカルに実行しているwchich以下の機能を持っている:
@roles('production')
def dir():
env.key_filename = '~/.ssh/deploy'
local("git push mysite master")
run('pwd')
run('ls')
code_dir = '/home/deploy/mysite'
with cd(code_dir):
run('pwd')
run('git reset --hard master')
run('ls -la')
出力:私は機能を実行すると
$ fab dir
[[email protected]] Executing task 'dir'
[localhost] local: git push mysite master
[email protected]'s password:
、私はパスワードの入力を求められます。キーを無視しているようです。所定のキーを使用するにはどうすればよいですか?
パスワードは 'git push'で尋ねられますか? – Leon
はいそうです。 – user61629
'git push'は' fabric'の下で実行され、 'fabric'で管理されていない別の接続を使ってリモートホストに接続します。 – Leon