Skip to content

Storage example not working #53

@mloubout

Description

@mloubout

The documentation's example for storage does not work and uses undefined Types.

  • GoogleCredentials doesn't exist it should be JSONCredentials

Changing it so it runs, and following every steps of the tutorials I still get a 403 Forbiden when running storage(:Bucketm, :list), is there something wrong with the setup described in the tutorial or am I doing something wrong?

julia> creds = JSONCredentials(expanduser("~/.gcp/credentials.json"))
project_id: polar-scarab-371513
client_email: xxxx

julia> session = GoogleSession(creds, ["cloud-platform"])
scopes: ["https://www.googleapis.com/auth/cloud-platform"]
authorization: Dict{Symbol, Any}()
expiry: 0001-01-01T00:00:00


julia> set_session!(storage, session)

julia> bkts = storage(:Bucket, :list)
get a HTTP request error: HTTP.Exceptions.StatusError(403, "GET", "/storage/v1/b?project=polar-scarab-371513", HTTP.Messages.Response:
"""
HTTP/1.1 403 Forbidden

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions