You should actually use the project ID and not the name as the other answers imply.
Example:
gcloud projects list
PROJECT_ID NAME PROJECT_NUMBER
something-staging-2587 something-staging 804012817122
something-production-24 something-production 392181605736
Then:
gcloud config set project something-staging-2587
It's also the same thing when using just the --project
flag with one of the commands:
gcloud --project something-staging-2587 compute ssh my_vm
If you use the name it will silently accept it but then you'll always get connection or permission issues when trying to deploy something to the project.