Generating SSH Keys

To generate an SSH key, click on the Environment tab. At the bottom of the list of your application environment variables, click the + Generate SSH keys link.

Generate SSH key link

From the Generate new SSH key dialog you can choose a name for you SSH key and the number of bits to use to generate it. Wercker will generate the key for you in the background and create two environment variables.

SSH key dialog

Note: The private key will be made protected so you cannot read it back. The public key should be copied to the destination.

Manually adding an SSH key

Alternatively you can create an SSH key manually by generating it locally and copying the private key as an environment variable. The environment variable must end with _PRIVATE. For instance if you wanted to manually add a BITBUCKET ssh key create a new environment variable called BITBUCKET_PRIVATE. It is also strongly recommended that you mark the private key Protected.

Manually added SSH key

Note that if you are using the Wercker CLI and running wercker build on the command line, you must create an environment variable called X_BITBUCKET_PRIVATE in your local environment.