Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gsutil AccessDeniedException: 401 Login Required

So I run the following:

gsutil -m cp -R file.png gs://bucket/file.png

And I get the following error message:

Copying file://file.png [Content-Type=application/pdf]...
Uploading   file.png: 42.59 KiB/42.59 KiB    
AccessDeniedException: 401 Login Required
CommandException: 1 files/objects could not be transferred.

I'm not sure what the problem is since I ran config and I can see all my buckets. Does anyone know what I need to do?

Note: I do not have gcloud, I just installed gsutil and ran the config.

like image 698
bryan Avatar asked Dec 29 '25 15:12

bryan


1 Answers

Login to Google Cloud is needed for accessing any Cloud service. You need to use below command which will guide you through login steps like typing verification code you generate by opening browser link given in console.

gcloud auth login
like image 95
akshat thakar Avatar answered Jan 01 '26 17:01

akshat thakar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!