1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/content/rest/deploy-keys/deploy-keys.md

35 lines
1.8 KiB
Markdown

---
title: REST API endpoints for deploy keys
shortTitle: Deploy keys
intro: Use the REST API to create and manage deploy keys.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
ghes: '*'
topics:
- API
allowTitleToDifferFromFilename: true
redirect_from:
- /rest/reference/deploy_keys
autogenerated: rest
---
## About deploy keys
{% data reusables.repositories.deploy-keys %}
Deploy keys can either be set up using the following API endpoints, or by using the {% data variables.product.company_short %} web interface. To learn how to set deploy keys up in the web interface, see "[AUTOTITLE](/authentication/connecting-to-github-with-ssh/managing-deploy-keys)."
There are a few cases when a deploy key will be deleted by other activity:
* If the deploy key is created with a {% data variables.product.pat_generic %}, deleting the {% data variables.product.pat_generic %} will also delete the deploy key. Regenerating the {% data variables.product.pat_generic %} will not delete the deploy key.
* If the deploy key is created with an {% data variables.product.prodname_oauth_app %} token, revoking the token will also delete the deploy key.
Conversely, these activities will not delete a deploy key:
* If the deploy key is created with a {% data variables.product.prodname_github_app %} user access token, revoking the token will not delete the deploy key.
* If the deploy key is created with a {% data variables.product.prodname_github_app %} installation access token, uninstalling or deleting the app will not delete the deploy key.
* If the deploy key is created with a {% data variables.product.pat_generic %}, regenerating the {% data variables.product.pat_generic %} will not delete the deploy key.
<!-- Content after this section is automatically generated -->