Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub troubleshooting ops recipe (#242)
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
content/docs/support-and-ops/ops-recipes/troubleshooting-github.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: "Troubleshooting GitHub" | ||
owner: | ||
- https://github.com/orgs/giantswarm/teams/team-honeybadger | ||
confidentiality: public | ||
--- | ||
|
||
Troubleshooting GitHub related issues. | ||
|
||
# Table of Contents | ||
1. [Deploy key is already in use](#deploy-key-is-already-in-use) | ||
|
||
## Deploy key is already in use | ||
|
||
Deploy keys are a great way to limit access to a single GitHub repository. The public part of the SSH key is attached | ||
directly to the repository instead of a personal account. The keys are by default granted only read permission on the | ||
repository. Optionally they can be granted write access where it can perform the same actions as an organization | ||
member with admin access. | ||
|
||
A deploy key can be attached to a single repository only. Adding it to another one will result in a `Key is already in use` error. | ||
|
||
However, you can technically get this error when you added the key to a repository that no longer exists / was deleted | ||
recently. You probably don't want to reuse the key in such a case but instead generate a new pair and use that. | ||
|
||
If for some reason you want to reuse the key and the repository where it was attached is deleted, the reason is that | ||
GitHub "soft" deletes repositories. It still exists for a time for restoration and the key is still attached to it, it | ||
is just completely hidden. | ||
|
||
1. Organization repositories can be restored under the GitHub organization settings page under `Deleted Repositories`. | ||
2. Once the repository is restored, remove the key under the `/settings/keys`. | ||
3. Delete the restored repository again if you don't need it anymore. | ||
4. Add the key to the new repository. |