access my gcloud through proxy

559 views
Skip to first unread message

Xiao Liang

unread,
Aug 15, 2016, 5:33:46 AM8/15/16
to google-cloud-sdk
Hi, here

I download google-cloud-sdk and setup to access my cloud storage through proxy. According to some experience from internet. it's work fine when I use below command.
http_proxy=[proxyserver] gsuilt ls

And I try the example from office site:
http_proxy=[proxyserver] go run example.go

it still work fine

but, I get some error If I use those code in a app engine developing server that run in my local computer. and My example code as bellow

func init(){
 http
.HandleFunc("/",hello)
}
func hello
(w http.ResponseWriter,r *http.Request){
 ctx
:= appengine.NewContext(r)
 client
, err:=storage.NewClient(ctx)
 bucket := client.Bucket(bucketName)
 
// do some stuff of read/write storage
}

developing server run as command
http_proxy=[proxyserver] goapp serve myapp


error message as bellow

 ERROR: Get https://www.googleapis.com/storage/v1/b/{...}: API error 2 (urlfetch: FETCH_ERROR): [Errno 101] Network is unreachable

Actually, those code is work fine when I deploy it on google app engine.

so I guess the reason is developing app engine server doesn't use proxy when running, How can I solve it?

Thanks in Advance

L.X.

Zachary Newman

unread,
Aug 15, 2016, 9:22:36 AM8/15/16
to Xiao Liang, Google Cloud Developers
-google-cloud-sdk@
+google-cloud-dev@

We've consolidated email groups, so that we can focus our support efforts.

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sdk+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/google-cloud-sdk.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sdk/ca0e424c-9d5e-48c1-83b4-e5ed1dc6dc93%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages