Access to your IBM Cloud account was denied

801 Views Asked by At

I created IBM cloud object storage and a bucket. When I try to list the buckets in the storage it works but when trying to read or write from bucket I am getting access denied.

Ravithejs-MacBook-Pro:~$ ibmcloud cos put-object --bucket hog-cli-bucket-name --key firstOne --body /Downloads/apikey.json
FAILED
Access to your IBM Cloud account was denied. Log in again by typing ibmcloud login --sso.

I tried logging in with apikey and sso but running into same issue again

2

There are 2 best solutions below

1
lifemikey On

Try just apikey

ibmcloud login --apikey <replace with your api key>

0
Vidyasagar Machupalli On

Check the permissions for your username.

  ibmcloud iam user-policies <user-name>

You should have Manager permission. You can check the bucket permissions as listed in the documentation in this link