Adding an SSH key to your account
It is recommended to use one key per client. It means if you access your Codeberg repository from your home PC, your laptop and your office PC you should generate separate keys for each machine.
In the context of Codeberg you should decide yourself if you add a passphrase to your SSH key or not. Read the on-going discussion about that topic in this Codeberg-Issue.
Generating an SSH key (pair)
Open a shell (e.g.
git-bashon Windows or
Paste the text below, substituting in your Codeberg email address.
$ ssh-keygen -t rsa -b 4096 -C "email@example.com"
This creates a new ssh key, using the provided email as a label:
> Generating public/private rsa key pair.
When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location:
> Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
Enter a passphrase if you want. See further discussions about the necessity of a passphrase in the context of Codeberg.
Add the SSH key to Codeberg
Copy the SSH key to your clipboard. Attention: Copy only the public part of the key not the private one. You can identify it by the
.pubextension. By default, you can find the public key in
On Linux you can use the
xclipcommand like this
$ xclip -sel clip < ~/.ssh/id_rsa.pub
On Windows use a text editor (e.g. Notepad) or
clipon the command line
$ type .ssh/id_rsa.pub | clip
Navigate to your user settings