Store credentials in a variable

How to store your credentials in a variable.