curl 将密码短语与命令行一起传递

Ope*_*ack 3 curl

我正在使用以下命令:

curl -X GET -k --header "Accept: text/plain" --key privateKey.pem --cert publicCert.pem --cacert ca.crt "https://example.org/update"
Run Code Online (Sandbox Code Playgroud)

执行此命令后,系统要求我输入密码:

Enter PEM pass phrase: 
Run Code Online (Sandbox Code Playgroud)

如何与命令行一起传递短语,从而不需要手动干预。

Ope*_*ack 8

正如 @dave 所建议的,添加--pass就可以了

curl -X GET -k --header "Accept: text/plain" --key privateKey.pem --cert publicCert.pem --cacert ca.crt "https://example.org/update" --pass myPassword
Run Code Online (Sandbox Code Playgroud)