The following should be done in a bash script:curl --digest --user schmijos https://bitbucket.org/u/p/get/tip.zip -o tip.zipHow can I automatically submit a password to curl when it asks for it? Since I don't want to see the password in any logfile, I won't do the following:curl --digest --user schmijos:$password https://bitbucket.org/u/p/get/tip.zip -o tip.zip
Pipe Password to Application When Asked
bash;pipe;password;curl;stdin
Use empty:With the password safely stored (it's a way of saying...)$ echo password > pwd-fileStart process with empty. (You would omit -L log in the real case.)$ empty -f -i fifo1 -o fifo2 -L log curl -u user http://example.comSend the contents of pwd-file to empty's input pipe, which the process sees as both its stdin and /dev/tty.$ empty -s -c -o fifo1 < pwd-fileThis is what happened in the pseudo terminal:$ cat log<<<Enter host password for user 'user':>>>password<<<