# How to Hide API Key in GitHub

> To hide your API key in GitHub, navigate to your repository, open Settings, and go to Security, Secrets and variables, then Actions. Click New repository secret, enter the secret name and your API key value, and click Add secret to finish.

Canonical: https://livedemo.ai/tutorials/how-to-hide-api-key-in-github/
Apps: GitHub
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a3f53ab56e05a00fe73c9/preview?step=1

## Steps

1. Navigate to your desired repository.
2. Click on the 'Settings' tab.
3. Under 'Security' select 'Secrets and variables'.
4. Select 'Actions'.
5. Click 'New repository secret'.
6. Add your secret name in the empty field.
7. Provide the value of the secret or your actual API key.
8. Click on the 'Add secret' button to complete the action.
