gcloud:部署失败,原因:无法复制证书



使用Windows 10,我正在尝试使用gcloud maven插件来部署我的VM托管appeengine项目。所以运行mvn干净安装成功后我运行mvn gcloud:deploy,它在控制台上失败并显示以下输出。

[INFO] Copying certificates for secure access. You may be prompted to create an SSH keypair.
[INFO] DEBUG: Loaded Command Group: ['gcloud', 'compute', 'copy_files']
[INFO] DEBUG: Error copying certificates. Retry 0 of 20.
[INFO] DEBUG: Error copying certificates. Retry 1 of 20.
[INFO] DEBUG: Error copying certificates. Retry 2 of 20.
[INFO] DEBUG: Error copying certificates. Retry 3 of 20.
[INFO] DEBUG: Error copying certificates. Retry 4 of 20.
[INFO] DEBUG: Error copying certificates. Retry 5 of 20.
[INFO] DEBUG: Error copying certificates. Retry 6 of 20.
[INFO] DEBUG: Error copying certificates. Retry 7 of 20.
[INFO] DEBUG: Error copying certificates. Retry 8 of 20.
[INFO] DEBUG: Error copying certificates. Retry 9 of 20.
[INFO] DEBUG: Error copying certificates. Retry 10 of 20.
[INFO] DEBUG: Error copying certificates. Retry 11 of 20.
[INFO] DEBUG: Error copying certificates. Retry 12 of 20.
[INFO] DEBUG: Error copying certificates. Retry 13 of 20.
[INFO] DEBUG: Error copying certificates. Retry 14 of 20.
[INFO] DEBUG: Error copying certificates. Retry 15 of 20.
[INFO] DEBUG: Error copying certificates. Retry 16 of 20.
[INFO] DEBUG: Error copying certificates. Retry 17 of 20.
[INFO] DEBUG: Error copying certificates. Retry 18 of 20.
[INFO] DEBUG: Error copying certificates. Retry 19 of 20.
[INFO] DEBUG: (gcloud.preview.app.deploy) Unable to copy certificates.
[INFO] Traceback (most recent call last):
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkcalliopecli.py", line 609, in Execute
[INFO]     result = args.cmd_func(cli=self, args=args)
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkcalliopebackend.py", line 1228, in Run
[INFO]     resources = command_instance.Run(args)
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdksurfacepreviewappdeploy.py", line 256, in Run
[INFO]     remote_build)
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkapi_libappdeploy_command_util.py", line 167, in BuildAndPushDockerImages
[INFO]     cli, version_id, remote, project) as docker_client:
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkapi_libappimagesdocker_util.py", line 224, in __enter__
[INFO]     self._vm = Provision(self._cli, self._name, self._zone, self._project)
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkapi_libappimagesdocker_util.py", line 55, in Provision
[INFO]     vm.CopyCerts()
[INFO]   File "C:Program FilesGoogleCloud SDKgoogle-cloud-sdklibgooglecloudsdkapi_libappimagesdocker_util.py", line 167, in CopyCerts
[INFO]     raise exceptions.ToolException('Unable to copy certificates.')
[INFO] ToolException: Unable to copy certificates.
[INFO] ERROR: (gcloud.preview.app.deploy) Unable to copy certificates.
[ERROR] Error: gcloud app command with exit code : 1

我正在使用gcloud maven插件版本2.0.9.90.v20151210,如下所示

<plugin>
    <groupId>com.google.appengine</groupId>
    <artifactId>gcloud-maven-plugin</artifactId>
    <version>2.0.9.90.v20151210</version>
    <configuration>
        <version>test-gcloud-plugin-v1-1x16</version>
        <runtime>java7</runtime>
        <verbosity>debug</verbosity>
        <log_level>info</log_level>
    </configuration>
</plugin>

使用最新的云 SDK

知道为什么会这样吗?

我遇到了同样的问题,并将其追溯到App Engine使用pscp.exe(Putty安全副本)的问题。 该程序会提示您对警告消息说"是",但是当 App Engine 运行它时,它会关闭标准输出,因此您无法看到警告。解决方法是键入 y,然后在看到Error copying certificates错误时enter控制台。

我已经为谷歌开了一张票(有关更多信息,请参阅该票证):https://code.google.com/p/google-cloud-sdk/issues/detail?id=529

您的证书很可能位于受保护的目录中。它发生在Mac上,我不得不使用sudo(在Windows世界中runas)来调用gcloud。

相关内容

  • 没有找到相关文章

最新更新