How to Set Up a Deploy Key for GitHub
Deploy keys in GitHub provide a secure way to grant SSH access to a single repository without using personal account credentials. This guide will walk you through the simple process of setting up a deploy key.
Step-by-Step Instructions
Navigate to Repository Settings
- Go to your GitHub repository.
- Click on the “Settings” tab in the top navigation bar.
Access Deploy Keys Section
- In the left sidebar, find and click on “Deploy Keys.”
Add a New Deploy Key
- Click the “Add deploy key” button (green button on the right side).
Configure Your Key
- In the “Title” field, enter a descriptive name for this key (e.g., “Production Server”).
- Check the “Allow write access” box if you need write permissions.
- For read-only access, leave this unchecked (recommended for most use cases).
Save the Key
- Click “Add key” to complete the setup.
Important Notes
- Deploy keys are tied to a specific repository.
- You must have admin access to the repository to add deploy keys.