gcloud beta ml init-project -- Error: Project does not exist, or you do not have permission - gcloud

I'm trying to get started with Google Machine Learning using these instructions: Getting Setup
When I run gcloud beta ml init-project I get
ERROR: (gcloud.beta.ml.init-project) Project [mnist1-151907] does not exist,
or you do not have permission to access it.
I'm running this command on Google Cloud's Ubuntu 16.04 virtual machine created under my projectID mnist1-151907 and I've given this machine access to all of Google Cloud's APIs.
The log ~/.config/gcloud/logs/2016.12.23/13.14.03.742050.log says
... "error": { "code": 403,
"message": Google Cloud Resource Manager API has not been used in project mnist1-151907 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=mnist1-151907 ...
I followed the log's instructions and the API is enabled, but I'm still getting the same error. Has anyone experienced this error or can offer a suggestion? Thank you.

I was receiving the same error after enabling the API. I had to play a little re-authenticating with the project the gcloud tool. i.e. gcloud init, gcloud auth revoke and gcloud auth login

Related

gcloud build requires "serviceusage.services.use", but i already have owner role

I am trying to submit a build using this command in the gcloud CLI:
gcloud builds submit --config cloudbuild.yaml .
but it returns this error:
(gcloud.builds.submit) The user is forbidden from accessing the bucket
[fastapi-api_cloudbuild]. Please check your organization's policy or
if the user has the "serviceusage.services.use" permission
I checked in the IAM admin panel and it says that my account has the owner role and that i have most permissions, and i authenticated in the gcloud cli, but i still get said error, i havent tried much since i have no idea what i could try since i already have the highest role. thank you.
Have you set your project in the cli with gcloud config set project <project>?
Otherwise the answer from this thread might help (billing).
or this one with Storage Admin
I had a similar issues (caused by the change of the billing account), and I fixed it by disabling Google Cloud Build API and re-enabling.
I used this commands:
gcloud services disable cloudbuild.googleapis.com --project "my_project"
gcloud services enable cloudbuild.googleapis.com --project "my_project"

Google Cloud Composer Environment Setup Error: Connect to Google Cloud Storage

I am trying to create an environment in Google Cloud Composer. Link here
When creating the environment from scratch and selecting all the default fields, the following error appears:
CREATE operation on this environment failed 22 hours ago with the following error message:
CREATE operation failed. Composer Agent failed with: Cloud Storage Assertions Failed: Unable to write to GCS bucket.
GCS bucket write check failed.
I then created a google cloud storage bucket within the same project to see if that would help and the same error still appears.
Has anyone been able successfully create a Google Cloud Composer environment and if so please provide guidance on why this error message continues to appear?
Update: Need to update permissions to allow access it seems like. Here is a screenshot of my permissions page but not editable.
It seems like you haven't given the required IAM policies to the service account. I would advise you to read more about the IAM policies on Google Cloud here
When it comes to the permissions of the bucket, there are permissions like the Storage Object Admin that might fit your needs.

How to use a Notary client to access IBM Cloud notary server

I got the following error when trying to use a Notary client to get the digest of a signed image in my IBM Container Registry. Can anyone advise how to solve it?
# notary -s https://us.icr.io:4443 lookup us.icr.io/securek8s/hello-world latest
* fatal: unauthorized: The login credentials are not valid, or your IBM Cloud account is not active.
BTW, I built the Notary client from https://github.com/theupdateframework/notary
Notary uses your credentials from your Docker login cache. The error message that you received suggests that your login to us.icr.io isn't valid. This usually means that your credentials have expired.
If you have the ibmcloud CLI and the container-registry plugin installed, you can refresh your login by making sure that you're targeting the US South registry (ibmcloud cr region-set us.icr.io) and then logging in with ibmcloud cr login.
If you don't have the CLI plugin installed, you can log in using Docker commands directly. For more information, see Automating access to IBM Cloud Container Registry
in the IBM Cloud docs.

I can't deploy despite having permissions on gcloud

When I try to deploy my project the following error appears:
ERROR: (gcloud.app.deploy) 403 Could not list bucket [page-example.com]: example#example.com does not have storage.objects.list access to page-example.com.
The solution I found was to update the gcloud components
with this command:
gcloud components update
Then log in again with your account.
gcloud auth login
With that you can deploy your web application.

403 status on deleting modules through gcloud preview app

I currently use
gcloud preview app modules delete <module_name> --version <version_to_delete> with a service account to clean up old module versions for managed vms. This has been working great up until last week. I am now getting the error below.
ERROR: (gcloud.preview.app.modules.delete) Error Response: [403] Project has not enabled the API. Please use Google Developers Console to activate the API for your project.
Details: [[{"#type": "type.googleapis.com/google.rpc.Help", "links": [{"description": "Google developer console API activation", "url": "https://console.developers.google.com/project/<project_id>/apiui/api"}]}]]
More specifics:
Using my personal account from google allows me to delete module versions
I currently set the service account with gcloud auth activate-service-account <some_id>#developer.gserviceaccount.com --key-file gcloud.json
You must enable the "App Engine Admin API" in the Developers Console in order to delete modules using a service account:
Go to https://console.developers.google.com/
Navigate to APIs and auth > APIs
Find and enable "App Engine Admin API"