Gcloud auth throws PyOpenSSL not available

I am trying to get gcloud in useful state on Travis, and I just can't pass the point gcloud auth activate-service-account.

When it starts, I get the following error:

ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. 
See https://developers.google.com/cloud/sdk/crypto for details.

I tried apt-get and pip installs with both the set export CLOUDSDK_PYTHON_SITEPACKAGES=1and nothing works.

Does anyone have any ideas or alternatives?

This is the version of Travis Ubuntu 14.04.

Update

If I run a command from documents on travis, I get the following error:

usage: gcloud auth activate-service-account  ACCOUNT --key-file KEY_FILE [optional flags]
ERROR: (gcloud.auth.activate-service-account) too few arguments

This made me think that I should have a parameter ACCOUNT, but after running the command locally with the key of the unencrypted service account, I know that this is not necessary (if something has not changed).

The only thing I can think of is that the file will not be decrypted correctly or the command itself is not like in Travis:

- gcloud auth activate-service-account --key-file client-secret.json

Update 2

, , . ( @Vilas )

, gcloud VM node, - .

$ which gcloud
/usr/bin/gcloud

$ gcloud --version
Google Cloud SDK 0.9.37
bq 2.0.18
bq-nix 2.0.18
compute 2014.11.25
core 2014.11.25
core-nix 2014.11.25
dns 2014.11.25
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.6
gsutil-nix 4.6
sql 2014.11.25

: gcloud?

, SDK ${HOME}/google-cloud-sdk/bin, .

$ ls -l ${HOME}/google-cloud-sdk/bin
total 24
drwxr-xr-x 2 travis travis 4096 Apr 27 21:44 bootstrapping
-rwxr-xr-x 1 travis travis 3107 Mar 28 14:53 bq
-rwxr-xr-x 1 travis travis  912 Apr 21 18:56 dev_appserver.py
-rwxr-xr-x 1 travis travis 3097 Mar 28 14:53 gcloud
-rwxr-xr-x 1 travis travis 3144 Mar 28 14:53 git-credential-gcloud.sh
-rwxr-xr-x 1 travis travis 3143 Mar 28 14:53 gsutil
+4
1

- . , Travis - gcloud SDK, SDK.

  • .travis.yml :

    env:
      global:
        # Ensure the downloaded SDK is first on the PATH
        - PATH=${HOME}/google-cloud-sdk/bin:$PATH
        # Ensure the install happens without prompts
        - CLOUDSDK_CORE_DISABLE_PROMPTS=1
    
  • :

    install:
    # Make sure SDK is downloaded - cache once it working
    # NOTE: Note sure how to update the SDK if it cached
    - curl https://sdk.cloud.google.com | bash;
    # List the SDK contents to ensure it downloaded
    - ls -l ${HOME}/google-cloud-sdk/bin
    # Ensure the correct gcloud is being used
    - which gcloud
    # Print the gcloud version and make sure it something
    # Reasonably up to date compared with: 
    # https://cloud.google.com/sdk/downloads#versioned
    - gcloud --version
    
+1

All Articles