A couple of useful GCP gcloud commands.
- check you are signed in a project in GCP
gcloud auth login
- login to a project, this will open you a browser to authenticate through it redirect back to console. gcloud compute ssh username@vmname --ssh-key-file=~/.ssh/google_vm
gcloud iam service-accounts list
show service accounts in the current GCP projectexport SERVICE_ACCOUNT=github-actions@your-system.iam.gserviceaccount.com
gcloud compute scp --zone europe-central2-a --recurse ./layouts jump:~/public
send alayout
folder to a public folder in the VM named jumpgcloud iam service-accounts describe $SERVICE_ACCOUNT
- add new priviliges to a service account
gcloud projects add-iam-policy-binding your-system \\
--member "serviceAccount:$SERVICE_ACCOUNT" \\
--role "roles/serviceusage.serviceUsageViewer"