First generate a ssh key pair on your local machine; use the username on the instance else it will create the user same as user on the local machine.
ssh-keygen -t rsa -f ~/.ssh/name -C username
chmod 400 ~/.ssh/name
Then login to your compute engine dashboard and click on metadata tab on the left. Go to ssh keys section and click edit,