Joined February 2014
·

Chester Rieman

Raleigh-Durham, North Carolina Area
·

Posted to Securely use basic auth with curl over 1 year ago

You can also use gpg to encrypt the password and then pass it as a variable to curl:

to encrypt:
gpg -c $FILE
this creates $FILE.gpg - encrypted password.

get password

PWFILE=~/<file>
gpg --batch $PWFILE.gpg
PASSWORD=cat $PWFILE
rm -f $PWFILE

curl -sL -k -u user:${PASSWORD} http://.........

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills