Add keys to ssh-agent

This commit is contained in:
Lucas Mathews
2025-12-13 16:47:54 +01:00
parent d25da71d42
commit f8afcf8f41
2 changed files with 17 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ tags: git, public
editor: markdown
dateCreated: 2025-05-04T11:38:34.846Z
---
# Creating SSH Key
## Creating SSH Key
Ideally the following steps are completed on the device and user which you want to allow the connection from, so it will be saved in their `~/.ssh` folder.
Run the following commands:
@@ -16,5 +16,12 @@ cd ~/.ssh
ssh-keygen -t ed25519 -C "your_email@example.com"
```
# Add Public key to Gitea
## Add Keys to ssh-agent
Run the following command
`ssh-add ~/.ssh/id_ed25519`
Replace `id_ed25519` in the command with the name of your private key file
## Add Public key to Gitea
`cat` the contents of the public key and add it into Gitea under **Settings** > **SSH / GPG Keys** > **Add key**.