gcloud

gcloud beta projects move some-project-id --organization=0

我的梦境 提交于 2020-01-04 09:08:10
问题 We created a project in the Google Cloud Console and it added it to an organization. We need to move this project to another organization where our other projects are. We are trying to move it with this gcloud command but we get an error. $ gcloud beta projects move some-project-id --organization=0 ERROR: (gcloud.beta.projects.move) INVALID_ARGUMENT: field [Project.parent] has issue [Project parent cannot be empty.] - '@type': type.googleapis.com/google.rpc.BadRequest fieldViolations: -

How to set path to kubectl when installed using gcloud components install?

青春壹個敷衍的年華 提交于 2020-01-04 04:12:11
问题 Ok, I installed kubectl in the following way on my Mac: 1) installed gcloud using homebrew 2) installed kubectl using gcloud components install. I want to run a shell script that calls kubectl directly. However, I get an error. $ kubectl version -bash: kubectl: command not found I expected gcloud components install to set path variables so that I can call kubectl. Looks like that has not happened. I searched for kubectl in my mac but was not able to find it. How can I get kubectl to work from

gcloud auth activate-service-account needs access to .ssh folder?

允我心安 提交于 2020-01-04 02:39:09
问题 I run gcloud auth activate-service-account --key-file=pathtokey then I run: gcloud compute scp sdfsdfsdfsdf.txt myinst:/tmp --zone us-east1-b And I get this error: WARNING: The PuTTY PPK SSH key file for gcloud does not exist. WARNING: The public SSH key file for gcloud does not exist. WARNING: The private SSH key file for gcloud does not exist. WARNING: You do not have an SSH key for gcloud. WARNING: SSH keygen will be executed to generate a key. open C:\Windows\system32\config\systemprofile

cannot find module /srv/server.js - gcloud app engine

流过昼夜 提交于 2020-01-03 13:38:55
问题 The error I get when trying to deploy my service to app engine is: Error: Cannot find module '/srv/server.js' at `Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3` I dont have a /srv/server.js and why would it look for it?!?!? Thanks if you can help! 回答1: Check your package.json, you should have at least: "main": "app.js" where app.js is

Where are Google Application Default Credentials stored?

感情迁移 提交于 2020-01-03 07:34:05
问题 When you run gcloud auth login or gcloud auth list, where is it storing the credentials? https://developers.google.com/identity/protocols/application-default-credentials 回答1: I found them. They are in ~/.config/gcloud/credentials . I was able to pass the default credentials to the docker image I'm working on by mounting them docker run --rm -it -v ~/.config/gcloud:/root/.config/gcloud alpine:3.4 sh . 回答2: Windows: C:\Users\%username%\AppData\Roaming\gcloud\credentials C:\Users\%username%

Where are Google Application Default Credentials stored?

回眸只為那壹抹淺笑 提交于 2020-01-03 07:33:30
问题 When you run gcloud auth login or gcloud auth list, where is it storing the credentials? https://developers.google.com/identity/protocols/application-default-credentials 回答1: I found them. They are in ~/.config/gcloud/credentials . I was able to pass the default credentials to the docker image I'm working on by mounting them docker run --rm -it -v ~/.config/gcloud:/root/.config/gcloud alpine:3.4 sh . 回答2: Windows: C:\Users\%username%\AppData\Roaming\gcloud\credentials C:\Users\%username%

How to fix google cloud ssl issue

喜夏-厌秋 提交于 2020-01-03 04:48:13
问题 I pointed a new custom domain to a Google App Engine Standard Environment project and edited the DNS records per Google's instructions, and it seems to be redirected properly. When I go to www.mydomain.com with its supposedly activated certificate, I still get connection is not secure in the browser. If I go to mydomain.com it gets redirected to www.mydomain.com with the same result. But when I directly enter https ://www.mydomain.com it display the website and with connection is secure. Let

Nodejs - Get content from external website

。_饼干妹妹 提交于 2020-01-03 04:26:12
问题 i wrote a simple website that returns a random 4-digit number every time you reload. Okay so i want to read that digit through Node.js .. Googled couple times and found out that axios and fs was my best bet.. My website: SOLVED The website above works on my browser.. might not on yours.. so i made a temp website for this.. it still doesn't work as expected: SOLVED I came up with this: let axios = require('axios'); let cheerio = require('cheerio'); let fs = require('fs'); axios.get('http:/

Nodejs - Get content from external website

浪尽此生 提交于 2020-01-03 04:26:05
问题 i wrote a simple website that returns a random 4-digit number every time you reload. Okay so i want to read that digit through Node.js .. Googled couple times and found out that axios and fs was my best bet.. My website: SOLVED The website above works on my browser.. might not on yours.. so i made a temp website for this.. it still doesn't work as expected: SOLVED I came up with this: let axios = require('axios'); let cheerio = require('cheerio'); let fs = require('fs'); axios.get('http:/

How to get gcloud auth activate-service-account persist

别说谁变了你拦得住时间么 提交于 2020-01-02 01:01:28
问题 I am using the bq command line tool to query from a Bigquery table. Is there a way to get the service account authentication to persist when I logged in and out of the box that the query process is running on? Steps I did: I logged into the linux box Authenticate service account by running: gcloud auth activate-service-account --key-file /somekeyFile.p12 someServiceAccount.gserviceaccount.com Query from bigquery table, this works fine: bq --project_id=formal-cascade-571 query "select * from