gcloud

Cannot connect to Compute Engine instance via SSH

送分小仙女□ 提交于 2019-12-02 23:29:50
I've just created an instance using Google Cloud Platform's Compute Engine and tried to connect to it via SSH connection but it failed. I'm following the quick start here . I have generated the SSH key on my PC and have entered the pass-phrase when asked. Though I fail to succeed a log in :-( I got the PuTTY SSH's error as below snapshots. Then I get the PuTTY window inactive. scampsi I have the same problem but found a workaround to connect via PuTTY manually. In brief Generate SSH key for the machine instance Add SSH public key to the instance Prepare to log in - acquiring information for IP

How to change the project in gcp using cli commands

冷暖自知 提交于 2019-12-02 14:11:13
How can i change the current running project to another project in GCP ( Google Cloud Platform ) account using cli commands other than using gcloud init manually. $gcloud projects list will list the projects running on my account. I want to change the current project to any other project from the list using a cli command. Zachary Newman gcloud config set project my-project You may also set the environment variable $CLOUDSDK_CORE_PROJECT . BlocksByLukas Make sure you are authenticated with the correct account: gcloud auth list * account 1 account 2 Change to the project's account if not: gcloud

Mac gcloud install ImportError: No module named __future__

你离开我真会死。 提交于 2019-12-02 13:01:29
问题 When installing gcloud for mac I get this error when I run the install.sh command according to docs here: Traceback (most recent call last): File "/path_to_unzipped_file/google-cloud-sdk/bin/bootstrapping/install.py", line 8, in <module> from __future__ import absolute_import I poked through and echoed out some stuff in the install shell script. It is setting the environment variables correctly (pointing to my default python installation, pointing to the correct location of the gcloud SDK).

How to remove gcloud fully?

孤街浪徒 提交于 2019-12-02 10:59:18
I'm new on mac. I just remove gcloud folders. And now when I open my command line window I always see next: -bash: /Users/myuser/gcloud/google-cloud-sdk/completion.bash.inc: No such file or directory -bash: /Users/myuser/google-cloud-sdk/path.bash.inc: No such file or directory -bash: /Users/myuser/google-cloud-sdk/completion.bash.inc: No such file or directory I know that made mistake removing not with gcloud command. But we have whad we have. So the main question is how to not get current logs when opening command line window on mac? The Cloud SDK makes only the following changes to the

Mac gcloud install ImportError: No module named __future__

风格不统一 提交于 2019-12-02 07:07:24
When installing gcloud for mac I get this error when I run the install.sh command according to docs here : Traceback (most recent call last): File "/path_to_unzipped_file/google-cloud-sdk/bin/bootstrapping/install.py", line 8, in <module> from __future__ import absolute_import I poked through and echoed out some stuff in the install shell script. It is setting the environment variables correctly (pointing to my default python installation, pointing to the correct location of the gcloud SDK). If I just enter the python interpreter (using the same default python that the install script points to

Google cloud ML with Scikit-Learn raises: 'dict' object has no attribute 'lower'

寵の児 提交于 2019-12-02 05:10:38
问题 I used the following tutorial to use my Scikit-learn sentiment-analysis model in Google Cloud: https://cloud.google.com/ml-engine/docs/scikit/quickstart My model defined as follows: import csv import os from collections import defaultdict import sys import re import numpy as np import random import math import sklearn.datasets from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB

Deployment to Google’s Compute Engine fails: Error retrieving the App Engine service account

喜夏-厌秋 提交于 2019-12-02 04:33:35
问题 After I’ve deleted some values (do not remember which) in my project configuration (in the Developer Console ) I cannot deploy an app to a Compute Engine instance. I’ve deployed the same code using the same configuration dozens of times successfully but after deleting some values in the Developer Console or doing some other adjustments that I considered minor, the deployment, using Maven plugin v2.0.9.95.v20160203, fails with [INFO] Beginning deployment... [INFO] WARNING: If this is your

How do I run custom python script in Google App engine

柔情痞子 提交于 2019-12-02 02:55:55
Apologies for the long detailed question. Here goes... The file has the name send_daily_report.py and uses some libraries which are detailed in a requirements.txt file. My app.yaml looks as follows: runtime: python27 threadsafe: false handlers: - url: /send_daily_report script: send_daily_report.py libraries: - name: ssl version: latest My cron.yaml looks as follows: cron: - description: "Send unsent subscriptions to Glocell rewards every 1 minute" url: /send_daily_report schedule: every 1 day from 00:00 And finally my requirements.txt has the following contents: Babel==2.5.3 cachetools==3.1.0

How to pass the password of an database in a non-interactive way for gcloud CLI?

巧了我就是萌 提交于 2019-12-02 02:45:05
问题 I am trying to pass the password to gcloud sql connect command in a non-interactive way. What I want to achieve is not being asked for password, but pass it in the command somehow. Not sure if it's possible, based on documentation, but on the other hand it's something very useful to automate tasks, I strongly believe that there is a way to do it... The command: gcloud sql connect <database_name> --user=<user_name> 回答1: gcloud sql connect provides "sugar" to facilitate connecting to Cloud SQL

How to set version when deploying gae java?

梦想的初衷 提交于 2019-12-02 02:37:22
问题 Since Intellij Idea IDE gae deployment plugin does not work, I have to use mvn appengine:update . It always deploy to version 1, ignoring version in appengine-web.xml. How to set version with mvn appengine:update deployment? 回答1: You can set it via a Maven property: <properties> <appengine.appId>my-application-id</appengine.appId> <appengine.version>my-application-version</appengine.version> </properties> PS: I'm also setting the applicationId here, you don't necessarily need that. 回答2: Set