我正在尝试下载一个folder在我的内部Google Cloud Bucket,我从google docs gsutil/commands/cp中读取并在该行下面执行.
gsutil cp -r appengine.googleapis.com gs:// my-bucket
但我得到了 error
CommandException:没有匹配的URL:appengine.googleapis.com
编辑
通过运行以下命令
gsutil cp -r gs:// logsnotimelimit.
我收到了错误
IOError:[Errno 22]无效模式('ab')或文件名:u'.\ logsnotimelimit\appengine.googleapis.com \nginx.request\2018\03\14\14:00:00_14:59:59_S0.json_. gstmp"
google-cloud-storage gsutil google-cloud-platform google-cloud-sdk
Google Cloud SDK安装过程在我的计算机(MAC)上失败,并让我跟踪堆栈跟踪.
Traceback (most recent call last):
File "/Users/ttn/Desktop/google-cloud-sdk/bin/bootstrapping/install.py", line 218, in <module>
main()
File "/Users/ttn/Desktop/google-cloud-sdk/bin/bootstrapping/install.py", line 203, in main
sdk_root=bootstrapping.SDK_ROOT,
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 452, in UpdateRC
completion_update, path_update, rc_path, sdk_root, host_os).Update()
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 214, in Update
self.path, rc_contents, source_line=self._GetSourceLine())
File "/Users/ttn/Desktop/google-cloud-sdk/lib/googlecloudsdk/core/platforms_install.py", line 167, in _GetRcContents
filtered_contents=filtered_contents, line=line)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 197: ordinal not in range(128)
Run Code Online (Sandbox Code Playgroud)
这里有更多细节:
系统的默认python版本
python -V
Python 3.6.1 :: Anaconda custom (x86_64)
Run Code Online (Sandbox Code Playgroud)
适用于Cloud SDK的Python版本.
echo $CLOUDSDK_PYTHON
/usr/bin/python2.7
Run Code Online (Sandbox Code Playgroud)
检查gcloud命令 …
我是谷歌云的新手,我正在尝试第一次部署它.我的第一个部署是Ruby on Rails项目.
我基本上是在谷歌云文档中遵循这个指南.唯一的区别是我使用自己的项目而不是他们提供的"你好世界"项目.
这是我的app.yaml文件
runtime: custom
vm: true
entrypoint: bundle exec rackup -p 8080 -E production config.ru
resources:
cpu: 0.5
memory_gb: 1.3
disk_size_gb: 10
Run Code Online (Sandbox Code Playgroud)
当我进入我的项目目录并运行gcloud preview app deploy它开始部署但似乎最终超时.它给出了错误 (gcloud.preview.app.deploy) Error Response: [4] DEADLINE_EXCEEDED.
做一些我发现运行的研究gcloud preview app deploy提供--verbosity debug了额外的调试信息,但它没有帮助我找到导致它超时的原因.
这是控制台日志的最后一块.
Bundle complete! 35 Gemfile dependencies, 102 gems now installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from rdoc:
Depending on your version of ruby, you may need to …Run Code Online (Sandbox Code Playgroud) ruby ruby-on-rails google-cloud-platform gcloud google-cloud-sdk
在安装Google Cloud SDK-Python时,会不断发生httplib2.SSLHandshakeError。我已经配置了unfilled_client_secrets.json(如下图所示)。并没有解决HandshakeError。
在下面的这里已经提出了类似的问题,但是没有明确回答。预先感谢您提供的任何帮助。
〜$ ./google-cloud-sdk/install.sh欢迎使用Google Cloud SDK!
追溯(最近一次通话):
文件“ /Users/rptrainor/./google-cloud-sdk/bin/bootstrapping/install.py”,行206,位于main()
文件中,“ / Users / rptrainor /./ google-主要安装(pargs.override_components,pargs.additional_components)
文件“ /Users/rptrainor/./google-cloud-sdk/bin/bootstrapping/install.py ”中的第184行的cloud-sdk / bin / bootstrapping / install.py” ”,在安装_CLI.Execute([''quiet','components','list'])
文件的第130行中,文件“ /Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py”执行self._HandleAllErrors(exc,command_path_string,指定的参数名称)中的第759行
文件的文件“ /Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py”执行资源= args.calliope_command.Run(cli = self,args = args)中的第737行,
文件“ /Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py”,第741行,在运行display_info = self.ai.display_info).Display()
文件” / Users / rptrainor / google-cloud-sdk / lib /googlecloudsdk/calliope/display.py”,第427行,位于Display self._printer.Print(self._resources)
文件“ /Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_printer_base.py”中在“打印资源中资源的资源
”中,第251行,文件“ /Users/rptrainor/google-cloud-sdk/lib/surface/components/list.py”,在运行结果= update_manager.List()中的第86行
文件“ /Users/rptrainor/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py”,行516,位于列表_,diff = self._GetStateAndDiff(command_path ='components.list')
文件“ / Users / rptrainor / google-cloud-sdk / lib / googlecloudsdk / core / updater / update_manager.py“,第446行,位于_GetStateAndDiff command_path …
python google-app-engine httplib2 python-2.7 google-cloud-sdk
我对如何在docker容器上验证gcloud sdk感到有点困惑.现在,我的docker文件包括以下内容:
#Install the google SDK
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
RUN mkdir -p /usr/local/gcloud
RUN tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz
RUN /usr/local/gcloud/google-cloud-sdk/install.sh
RUN /usr/local/gcloud/google-cloud-sdk/bin/gcloud init
Run Code Online (Sandbox Code Playgroud)
但是,我很困惑我将如何进行身份验证?当我gcloud auth application-default login在我的机器上运行时,它会在chrome中打开一个新选项卡,提示我登录.如果在容器中的谷歌浏览器中打开新选项卡,我将如何在docker容器上输入我的凭据?
今天,我们的开发容器在从Google Cloud SDK运行App Engine(GAE)标准本地开发环境时开始抛出错误.
ERROR 2017-12-15 09:38:37,766 http_runtime.py:396] bad runtime process port ['']
Traceback (most recent call last):
File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 103, in <module>
_run_file(__file__, globals())
File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 97, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/runtime/runtime.py", line 39, in <module>
from google.appengine.tools.devappserver2 import wsgi_server
File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 34, in <module>
import ipaddr
ImportError: No module named ipaddr
Run Code Online (Sandbox Code Playgroud)
看起来它是由升级到自动发生的最新SDK引起的.
php google-app-engine google-cloud-platform google-cloud-sdk
更新(2019-02-07):该问题现已修复,因此如果仍然遇到此问题,请尝试gcloud components update。
在过去几个月中的某个时候,我的bq工具停止工作了。即使是简单的事情也会显示此错误:
$ bq show
BigQuery error in show operation: Cannot contact server. Please try again.
Traceback: Traceback (most recent call last):
File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 685, in BuildApiClient
response_metadata, discovery_document = http.request(discovery_url)
File "/opt/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py", line 176, in new_request
redirections, connection_type)
File "/opt/google-cloud-sdk/platform/bq/third_party/oauth2client_4_0/transport.py", line 283, in request
connection_type=connection_type)
File "/opt/google-cloud-sdk/platform/bq/third_party/httplib2/__init__.py", line 1626, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/opt/google-cloud-sdk/platform/bq/third_party/httplib2/__init__.py", line 1368, in _request
(response, …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用他们的Java SDK从Google Cloud Storage下载一个字节范围。
我可以像这样下载整个文件。
Storage mStorage; // initialized and working
Blob blob = mStorage.get(pBucketName, pSource);
try (ReadChannel reader = mStorage.reader(blob.getBlobId())) {
// read bytes from read channel
}
Run Code Online (Sandbox Code Playgroud)
如果我愿意,我可以ReadChannel#seek(long)直到达到所需的起始字节,然后从该点下载一个范围,但这似乎效率低下(尽管我不知道实现中到底发生了什么。)
理想情况下,我想指定Google Cloud Storage REST API 中所示的Range: bytes=start-end标头,但我不知道如何在 Java 中设置标头。
如何在 Java SDK Storage get 调用中指定字节范围,或指定标头,以便我可以有效地下载所需的字节范围?
开始约会 gcloud:
Your current Cloud SDK version is: 321.0.0
You will be upgraded to version: 322.0.0
????????????????????????????????????????????????????
? These components will be updated. ?
????????????????????????????????????????????????????
? Name ? Version ? Size ?
????????????????????????????????????????????????????
? Cloud SDK Core Libraries ? 2021.01.05 ? 16.1 MiB ?
? Kuberun ? 0.0.1 ? 20.6 MiB ?
????????????????????????????????????????????????????
Run Code Online (Sandbox Code Playgroud)
我得到错误:
?? Uninstalling: Cloud SDK Core Libraries ??
??????????????????????????????????????????????????????????????
?? Uninstalling: Kuberun ??
ERROR: (gcloud.components.update) ???????? ? ???????: [C:\Users\USER_NAME\AppData\Local\Google\ct4j-cloud-sdk\LATEST\google-cloud-sdk.staging\platform\kuberun_licenses\LICENSES.txt]
Ensure you have the permissions to access the …Run Code Online (Sandbox Code Playgroud) 当我在 google-cloud-sdk 上运行 dev_appserver.py 时,出现 ImportError:没有名为 py27_urlquote 的模块。
Traceback (most recent call last):
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 109, in <module>
_run_file(__file__, globals())
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 103, in _run_file
_execfile(_PATHS.script_file(script_name), globals_)
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in _execfile
execfile(fn, scope)
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 44, in <module>
from google.appengine.tools.devappserver2 import dispatcher
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 43, in <module>
from google.appengine.tools.devappserver2 import module
File "/Users/user/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 39, in <module>
import py27_urlquote
ImportError: No module named py27_urlquote
Run Code Online (Sandbox Code Playgroud)
我已经尝试过以下方法: