It would be very nice if there was an option to specify a password via the command line when connecting to an rsync repository, which would make integrating rsync into scripts much easier. Currently you need to specify a password file that holds the passwords or set the RSYNC_PASSWORD variable. It would be easier if one could just use options like: --password=somepassword --user=someuser or being able to say: rsync://user:password@server:port/src/ destination
In bash, you can effectively provide the password in the command like this: rsync --password-file=<(echo somepassword) That translates into something like rsync --password-file=/dev/fd/63 , where /dev/fd/63 is a pipe into which bash has loaded the text somepassword. I think a --password option should not be added to rsync because of the easy alternative and because actually passing the password in a command-line argument often reveals it to other users on the system.
Use the environment variable or a pipe as in comment #1.