Using Git Repository SSH Keys
Important
The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers.
We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post
A Git repository SSH key, sometimes called a deploy SSH key, is an SSH key with no password that provides access to a private Git repository. Ideally, it doesn't belong to any specific developer. Its purpose is to allow AWS OpsWorks Stacks to asynchronously deploy apps or cookbooks from a Git repository without requiring any further input from you.
The following describes the basic procedure for creating a repository SSH key. For
details, see the documentation for your repository. For example, Managing deploy keys
To create a repository SSH key
-
Create a deploy SSH key pair for your Git repository on your workstation using a program such as
ssh-keygen
.Important
AWS OpsWorks Stacks does not support SSH key passphrases.
-
Assign the public key to the repository and store the private key on your workstation.
-
Enter the private key in the Repository SSH Key box when you add an app or specify cookbook repository. For more information, see Adding Apps.
AWS OpsWorks Stacks passes the repository SSH key to each instance, and the built-in recipes then use the key to connect to the repository and download the code. The key is stored in the deploy attributes as node[:deploy]['appshortname'][:scm][:ssh_key], and is accessible only to the root user.