I recently started using Google Cloud Storage. Initially I created a dummy project while installing the Cloud SDK. Now I am working on another project. The gsutil is still pointing to my previous project. How do I make it point to my new project??
P.S. I know there is an option of using -p argument, but this does not work on all commands.
Open it up, scroll down to the line default_project_id = , and change the project after the equals sign. Edit: I missed that you were using gsutil as part of the gcloud suite. My suggestion only applies if you've installed gsutil directly. Travis's suggestion is the right one if you have gcloud installed.
Go to the Dashboard page in the Google Cloud console. Click the Select from drop-down list at the top of the page. In the Select from window that appears, select your project.
To change the default project that gcloud (and gsutil) use in a gcloud installation, you should do this:
gcloud config set project desired-project-id-here
You can view your current settings with gcloud config list
.
You can view all configurations available with gcloud config configurations list
.
You can then switch to an alternate configuration with gcloud config configurations activate [NAME]
I got this fixed by running gcloud init
and following the commands to reinitialize the configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With