Skip to content

Commit 5fa8645

Browse files
author
Jonathan Visser
committed
docs: hypernode-deploy: Add docs about using Bitbucket repository SSH keys
1 parent 969987d commit 5fa8645

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/hypernode-deploy/pipelines/bitbucket-pipelines.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ For example, these environments can be:
1414

1515
Hypernode Deploy will need a pair of SSH keys for authentication to the server.
1616

17-
First, we generate an SSH keypair on the production server, copy the public key to the `~/.ssh/authorized_keys` file
17+
#### Use Bitbucket repository SSH Keys
18+
19+
Bitbucket allows you to create an SSH key from the Repository Settings, you do this by going to **Repository Settings -> Pipelines -> SSH Keys**
20+
21+
1. Under **SSH key** press the **Generate keys** button.
22+
1. Copy the Public key as showed in the textbox to the `~/.ssh/authorized_keys` file on your host.
23+
24+
#### Generating own pair of SSH Keys
25+
26+
You cangenerate an SSH keypair on the server, copy the public key to the `~/.ssh/authorized_keys` file
1827
and encode the private key with base64. We'll use this base64-encoded private key later on.
1928

2029
```console
@@ -28,6 +37,10 @@ Now go to your Bitbucket repository and enable Bitbucket pipelines being going t
2837

2938
Now go to **Repository settings -> Pipelines -> Repository variables**.
3039

40+
```{note}
41+
If you used Bitbucket Pipeline SSH Keys as described above, you do not need to add an `SSH_PRIVATE_KEY` environment variable.
42+
```
43+
3144
1. Create a new variable with name `SSH_PRIVATE_KEY`, mark this variable as Secured.
3245
1. Set the **Value** to the base64-encoded private key we generated earlier.
3346
1. Click **Add**.

0 commit comments

Comments
 (0)