Download git with key-based access

This is how to download git project with key-based access:

ssh-agent bash -c 'ssh-add <key file>; git clone git@bitbucket.org:<user>/<repo name>.git'