Inside of the template you need to edit the component. If you want to use the credential applied to the node you would set the following:
![2014-12-04_08h55_52.png]()
Inside of your script you are already calling the credential correctly using the -credential ${CREDENTIAL} string.
Let me know if this works!