user630702
user630702

Reputation: 3097

copy files to GCP bucket without gcloud or gsuilt?

I need to copy files from ESXI to GCP bucket. Gcloud can't detect internet connection which I've mentioned here . Is there another way like rsync or scp that I can use to upload files?

Upvotes: 0

Views: 938

Answers (2)

guillaume blaquiere
guillaume blaquiere

Reputation: 75715

On google cloud, all is API. So yes, you can perform your own API calls and thus not use the CLI (very handful). The understand what are the calls done by the CLI, you can ask them to print their http trace

With gsutil, add the -D param, like this

gsutil -D ls

As you could see, you have to add a Bearer access token, in the Authorization header. To generate it, you can use the gcloud CLI. Here again, you can add the param --log-http to have the details of the HTTP calls

gcloud auth print-access-token --log-http

Good luck!! The CLIs are very handful. Not using them is long, hard, full of possible bugs,...

Upvotes: 1

coryan
coryan

Reputation: 826

There is no scp or rsync support in GCS. You can use one of the client libraries, but they speak the same protocol as gsutil, basically HTTP transfers of different kinds.

Sounds like your VM running in ESXI is not configured to access the Internet, that may be:

  • A mistake, in that case your administrator should be able to fix it.
  • Intentional, in that case your administrator can explain how they envisioned accessing Internet services.

It is possible you need to talk your administrator about additional configuration, like setting up a proxy, or opening access to specific hosts (e.g. storage.googleapis.com), or maybe setting up the network (I have read about VPC's in similar contexts, but that is the limit of my knowledge on that topic).

Upvotes: 0

Related Questions