- ssh.
- terminal.
- text editor.
-
Generate ssh key !
$ ssh-keygen -t ed25519 -a 100 -
Add it to cedeberg.org !
-> Settings
-> SSH / GPG keys
-> Manage SSH keys
-> add key
-> Fill "Key name" !
-> Fill Content with your public key / your-private-key.pub !
-> Add key
-
Add these lines to your ssh config / ~/.ssh/config !
Host codeberg.org Hostname codeberg.org User git IdentityFile ~/.ssh/your-private-key -
Test it using this command to make sure it works !
$ ssh -T [email protected]if it works, you will get this kind of outputs :
Hi there, your_username ! You've successfully authenticated with the key named codeberg.pub, but Forgejo does not provide shell access. If this is unexpected, please log in with password and setup Forgejo under another user. -
Enter your local repository and set the remote url !
$ git remote set-url origin [email protected]:your_username/your_repository.git -
Try add stuff, commit it and push it to your remote repository !