`transfers.rsync` ignores ssh agent and always asks for key password
See original GitHub issueThanks for making patchwork compatible with Python 3! Trying to port one small project to Fabric v2:
from invoke import task
from patchwork.transfers import rsync
def get_proj_path():
from fabric.main import program
return program.collection.loaded_from
@task
def upload(c):
rsync(c, '%s/configs' % get_proj_path(), '/tmp')
> /Users/user/.virtualenvs/test1/lib/python3.6/site-packages/patchwork/transfers.py(131)rsync()
129 cmd = cmd.format(options, source, user, host, target)
130 import ipdb; ipdb.set_trace()
--> 131 return c.local(cmd)
Remote command works fine with ssh agent running:
ipdb> print(c.run('pwd'))
/root
Command exited with status 0.
=== stdout ===
/root
(no stderr)
c.local("rsync -pthrvz --rsh='ssh -p 22 ' /Users/user/work/project/configs root@1.2.3.4:/tmp")
asks for ssh key:
ipdb> c
Enter passphrase for key '/Users/user/.ssh/id_rsa':
Running the same command from the shell works fine:
% rsync -pthrvz --rsh='ssh -p 22 ' /Users/user/work/project/configs root@1.2.3.4:/tmp
sending an incremental file list
sent 237 bytes received 18 bytes 72.86 bytes/sec
total size is 10.45K speedup is 40.99
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
SSH ignores key in agent and keeps asking for key decryption ...
I guess SSH identifies the keys available in the agent by their public part - without them it thinks that the key is...
Read more >How to Setup Rsync without password with SSH on UNIX ...
You can use rsync via ssh without a password by using public key authentication (key pair with no password) and the command option...
Read more >Passwordless rsync while requiring key and password for all ...
I have a server set up to require public-key authentication for ssh access using a key with a password.
Read more >How to pass password automatically for rsync SSH command?
the easiest way to pypass password prompt every time you transfer or login your ssh is to create a key, here's how you...
Read more >[SOLVED] Rsync through ssh with public/private key keeps ...
Set up ssh so you can login with key-based authentication. You do not need a password when this is working. Make sure you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Below is my current workaround for this issue:
I’m having another problem related to this (problems with
local
mentioned above), trying to run my django unit tests before deploying:Gives me this:
But running remotely with
c.run
works just fine.