How to retrieve a password from Keychain command-line? According to many pages, it should be easy to retrieve command line a password using security. 

I tried several options without success:



$sudo security list-keychains  
    "/Library/Keychains/System.keychain"
$sudo security find-generic-password -s "proxy_test"
    The specified item could not be found in the keychain.
$sudo security find-generic-password -s "proxy_test" -a "collector" -g
    The specified item could not be found in the keychain.
$sudo security find-generic-password -s "socks://proxy_test"
    The specified item could not be found in the keychain.
$sudo security find-key -s "proxy_test"
    The specified item could not be found in the keychain.
$sudo security unlock "login"
...
$sudo security find-key -s "proxy_test"
    The specified item could not be found in the keychain.
...
long etc. with sudo/without sudo.
Seems proxy as part of internet, require another command:

security find-internet-password -s "proxy_test" -g