1

Using windows 10, I am trying to use gcloud maven plugin to deploy my VMs managed appeengine project.So after running mvn clean install successfully I run mvn gcloud:deploy ,It fails with the following output on the console.

[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 Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 609, in Execute
[INFO]     result = args.cmd_func(cli=self, args=args)
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1228, in Run
[INFO]     resources = command_instance.Run(args)
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\surface\preview\app\deploy.py", line 256, in Run
[INFO]     remote_build)
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 167, in BuildAndPushDockerImages
[INFO]     cli, version_id, remote, project) as docker_client:
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_util.py", line 224, in __enter__
[INFO]     self._vm = Provision(self._cli, self._name, self._zone, self._project)
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_util.py", line 55, in Provision
[INFO]     vm.CopyCerts()
[INFO]   File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\images\docker_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

I am using gcloud maven plugin version 2.0.9.90.v20151210 as following

<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>

with latest cloud sdk

Any idea why this happens ?

A_Di-Matteo
  • 26,902
  • 7
  • 94
  • 128
Tareq Assi
  • 149
  • 13

2 Answers2

1

I had the same problem and tracked it down to an problem in App Engine's use of pscp.exe (Putty secure copy). That program is prompting you to say "yes" to a warning message, but when App Engine runs it, it turns off standard output so you can't see the warning. A workaround is to type y and then enter into the console when you see the Error copying certificates error.

I've opened a ticket for Google (see that for more info): https://code.google.com/p/google-cloud-sdk/issues/detail?id=529

speedplane
  • 15,673
  • 16
  • 86
  • 138
  • Thank you . I ended up using ubuntu and didn't face this issue. new issue (of course) appeared , see the update here http://stackoverflow.com/questions/35253252/deployment-failed-due-to-request-had-insufficient-authentication-scopes – Tareq Assi Feb 09 '16 at 08:54
0

Most likely your certificates are in a protected directory. It happened to me on Mac, where I had to use sudo (runas in Windows world) to call gcloud.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58