Sourcetree keeps asking for password

Open git command line of current repository and run:
git config credential.helper store
Note: you may need to enter password onetime again.