Skip to content

Commit bbd5513

Browse files
authored
Better explain in the README how to set up keys in repositories (#96)
1 parent a652a40 commit bbd5513

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ GitHub Actions only have access to the repository they run for. So, in order to
2020

2121
## Usage
2222

23-
1. Create an SSH key with sufficient access privileges. For security reasons, don't use your personal SSH key but set up a dedicated one for use in GitHub Actions. See below for a few hints if you are unsure about this step.
23+
1. Generate a new SSH key with sufficient access privileges. For security reasons, don't use your personal SSH key but set up a dedicated one for use in GitHub Actions. See below for a few hints if you are unsure about this step.
2424
2. Make sure you don't have a passphrase set on the private key.
25-
3. In your repository, go to the *Settings > Secrets* menu and create a new secret. In this example, we'll call it `SSH_PRIVATE_KEY`. Put the contents of the *private* SSH key file into the contents field. <br>
26-
This key should start with `-----BEGIN ... PRIVATE KEY-----`, consist of many lines and ends with `-----END ... PRIVATE KEY-----`.
27-
4. In your workflow definition file, add the following step. Preferably this would be rather on top, near the `actions/checkout@v2` line.
25+
3. Add the public SSH key to the private repository you are pulling from during the Github Action as a 'Deploy Key'.
26+
4. Add the private SSH key to the repository triggering the Github Action:
27+
* In your repository, go to the *Settings > Secrets* menu and create a new secret. In this example, we'll call it `SSH_PRIVATE_KEY`.
28+
* Put the contents of the *private* SSH key file into the contents field. <br>
29+
* This key should start with `-----BEGIN ... PRIVATE KEY-----`, consist of many lines and ends with `-----END ... PRIVATE KEY-----`.
30+
5. In your workflow definition file, add the following step. Preferably this would be rather on top, near the `actions/checkout@v2` line.
2831

2932
```yaml
3033
# .github/workflows/my-workflow.yml

0 commit comments

Comments
 (0)