Reza Shahbazi
Reza Shahbazi

Reputation: 451

Failure: GCE credentials requested outside a GCE instance

When I try to copy my files to Google Cloud Storage using

gsutil cp  file.gz gs://somebackup

Get this error:

Your "GCE" credentials are invalid. For more help, see "gsutil help creds", or re-run the gsutil config command (see "gsutil help config").
Failure: GCE credentials requested outside a GCE instance.

BTW, this was working until last yesterday.

Upvotes: 2

Views: 1434

Answers (3)

Tim Russell
Tim Russell

Reputation: 309

Just ran into this as well and contacted Google support. It's occurring because the instance was created with Storage permissions as Read Only, visible on the instance details page:

Apparently this can't be changed after the instance is created (!). Our solution was to mount a temp disk, copy the file there, unmount it and then remount it on a second instance (with proper Storage permissions) and do the gsutil copy from there.

Upvotes: 1

Tjorriemorrie
Tjorriemorrie

Reputation: 17282

I've had this before and my problem was that I've set the wrong project.

Make sure you set the project ID and not project name when you run gcloud config set project <projectID>

Upvotes: 0

George
George

Reputation: 1110

Try to do a "gcloud auth login" from the command line

Upvotes: 0

Related Questions