Reputation: 345
Try to create a datalab session following this page: https://cloud.google.com/datalab/docs/quickstarts
$datalab create instance-name
after running this code, a error occured.
ERROR: (gcloud.source.repos.create) ResponseError: status=[PERMISSION_DENIED], code=[403], message=[You do not have permission to access project [project-name] (or it may not exist): The caller does not have permission]. Failed to find or create the repository datalab-notebooks. Ask a project owner to create it for you.
I am the editor role in this project.
I think editor has permission to access project...
Why does this error occur?
And how can I create datalab-notebook?
Please any idea for me...
Upvotes: 2
Views: 1765
Reputation: 14988
You may need to enable the Cloud Source Repositories
API.
The easiest way to do this is to click on the link that can sometimes be within the error message you receive - like below but with your own account specifics and your project name at the end: https://console.cloud.google.com/apis/library/sourcerepo.googleapis.com/?project=<YOUR-PROJECT-NAME>
and may be hidden within the error message you received much like this:
ERROR: (gcloud.source.repos.create) ResponseError: status=[PERMISSION_DENIED],
code=[403], message=[User[<YOURACCOUNT@gmail.com>] does not have permission to access
project[<YOUR-PROJECT-NAME>] (or it may not exist): The caller does not have permission].
details:
- Cloud Source Repositories API is not enabled. Please enable the API on the Google
Cloud console.
enable at: https://console.cloud.google.com/apis/library/sourcerepo.googleapis.com/?project=<YOUR-PROJECT-NAME>
Failed to find or create the repository datalab-notebooks.
Ask a project owner to create it for you.
Hover over the address listed in the error message in your google cloud shell and you will even get a hyperlink to take you right there. Enable it when the page finishes opening.
Alternatively, you can track the API down by going to APIs & Services/Library
and searching for Cloud Source Repositories
. Click on the card that comes up, and then when the destination page finishes loading, click the ENABLE
button.
You should be able to run the
datalab create instance-name
command in your google cloud shell now without issue.
Upvotes: 0
Reputation: 1066
EDITOR permissions are not sufficient to create a repository; you have to have the OWNER role to do that.
You have two options for this:
or
--no-create-repository
flag to tell the datalab
command to skip repository creation.Upvotes: 4