There are 2 ways of solving this that I know of:
- .pgpass password file in your home directory on remote host
- PGPASSWORD env variable (set on remote host)
If you need to set an environment variable on remote host, use with shell_env(PGPASSWORD='mypassword')
, Fabric docs here: fabric.context_managers.shell_env
Hope it solves your problem.