Google Cloud SDK documentation - google-cloud-platform

I have just started looking at Google Cloud. I have been following this tutorial to try to setup the system.
I can successfully download the tar file, I can successfully run install.sh, however when I run the following command I get some unusual behaviour:
./google-cloud-sdk/bin/gcloud init
1) I agree to login - fine.
2) It brings up a page where I need to choose one of my accounts, which I do.
3) It brings up a website saying:
Google Cloud SDK wants to access your Google Account
I then hit Allow.
4) This is where it all goes wrong. It then tries to go to a website such as the following:
http://localhost:8085/?code=4/tQD6sXNDlkpcdFUctB7ZgKKuj7T1Aiqev4o7zGaDVpctit6zrqFfWbnAXSo_zFTVjo4_VyxrUlUtq8IgsRAS7M0&scope=openid%20email%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/cloud-platform%20https://www.googleapis.com/auth/appengine.admin%20https://www.googleapis.com/auth/compute%20https://www.googleapis.com/auth/accounts.reauth%20https://www.googleapis.com/auth/plus.me
The website displays something saying 'This site can't be reached'.
This seems strange to me. Why is Google attempting to access http://localhost:8085 ? Surely it should be going to some kind of Google site.
If you could offer any help or advice, I would very much appreciate it. Please bear in mind that I am new to Google Cloud and I would need some very basic help. I am trying to setup a simple website with something like "hello world" with html/css and python.
If you know of any alternative tutorials that work, I would really appreciate it.

I had the same problem as you. I solved it by using gcloud auth login --no-launch-browser

Related

Stuck on complying with domain verification requirements

Recently I have been trying to re-boot my app. This includes adding google play services to my app.
I setup a google cloud platform account and then linked it with the developer console for my app.
Next I setup the OAuth consent screen. After completing everything it asked me to verify my website and domain; I completed this step with the google search API.
Despite all of these efforts I still got the error, Pending developer action.
Here is my verified domain (blurred out for obvious reasons):
After observing the documentation a little bit more, it tells me that I must continue/reply to the email thread with their Trust and Safety team, but I have not received any emails from them with my developer email -
Thanks in advance
-James
I have actually found the solution to this problem, and I think I can safely say that this is due to human error every single time.
When linking your google play app in the developer console to google cloud it might automatically create one for you, but if you reload the page it will make a second one. You have to make sure you select the right google cloud app to link because it might not properly connect if you use the wrong one.
Once you have done this you need to create a website or link a website that has been verified (you can verify it yourself) with google. You should then be able to setup your app easily! Not every step will be instant you might sometimes have to wait a day or two for it to work.

How to make MainPageSuffix work in Google cloud storage?

I have a simple hugo site, deployed in google cloud storage as static web site and its working fine with one issue, Whenever the subfolder is requested in browser with / , the browser trying to download and failing. without / its working fine.
ie, http://mysite/ is working fine, but http://mysite/subfolder/ is not working but trying to download it and fails. whenever http://mysite or http://mysite/subfolder is called the browser working fine.
Please see supporting images and help to solve the issue.. Thanks.
What Google document says..
While testing its ok,
But after deployed to Google Cloud storage, its behaving like this..
Please check the faulty url
Here
Please check the working url
Here
Finally resolved...
x-goog-metageneration:1 works, x-goog-metageneration:2 fails.
So as per https://cloud.google.com/storage/docs/xml-api/reference-headers
I deleted and recreated the surya folder, now its working.
But why x-goog-metageneration:2 fails, x-goog-metageneration:1 working...
Google only knows.

trying to setup TinyWebDB on google cloud, but deploy not working

I am trying to follow the instructions on this page, and they are working great, until the part where I deploy from my Google App Engine Launcher. When I click deploy I should see something like this:
But instead, I see something like this:
and the end result is that my app doesn't get deployed to xxxxxxx.appspot.com, it redirects me to http://localhost:8080/?code=4/EfmizPdAPVDgoSInA8mS1KVOvQTkWX4ziFnEpG3XKxA#
I'm a begginer with this kind of tech, please, any suggestions on how to troubleshoot?
Found the answer here. In my case, what worked was to first disable the app in the App Engine Launcher, and only then hit deploy. First time I tried, it authenticated, then second time I deployed, it deployed successfully. Thanks Arnie.
In case, I post his other suggestions:
1) remember to give your google id access to less secure apps.
2) remember to go to appspot.com or https://appengine.google.com/ and accept terms and conditions. Your project should also be active on https://console.developers.google.com/project
3) use correct versions of python and google app engine SDK
4) Before hitting deploy button on google app engine stop the app from running on your local host. It will NOT deploy while it is running locally on local host.

Run private Python script on Google Cloud Platform

for the following problem I need some advice on what would be the best to do:
I want to keep track on my emails so I wrote a small Python script which does exactly that. Since it is my GMail account I am looking at and I would like to store the data in a Google spreadsheet I thought about using the Google App Engine.
This script should be triggered everytime there is a new email in my post box. What would be the smartest way to do so considering any security issues?

Gdata authorization errors

I have installed the google data python library in order to connect to google docs through python. The problem is that I am constantly getting a 401 error, while running the ./samples/docs/docs_example.py (as suggested on https://developers.google.com/gdata/articles/python_client_lib?csw=1#library) saying that authorization is required. But this is really strange, because I ran the tests using ./tests/run_data_tests.py and everything seemed to be fine (no errors here). Also I put in the right credentials of my google account, while running docs_example.py.
Has someone came across this issue before, or does somebody know a solution??
Tnx for your help.