You are here: Foswiki>Applications Web>AppHowToMain>AppHowToGitPrepareSshKey (12 Jan 2023, AndreasSchaller)Edit Attach

Git Prepare logins and ssh keys for git usage

To use git comfortably we first have to make our public ssh user key known to Git (more detailed information about using ssh keys for connecting to Git can be found here https://help.github.com/en/articles/connecting-to-github-with-ssh).

Create your own public / private ssh keys

First, go to ~/.ssh/ and check, if you already have an existing pair of ssh keys:
ls -al ~/.ssh

Typically, the ssh keys are named id_ed25519 and id_ed25519.pub. If they do not exist, create your own ssh keys by typing
ssh-keygen -t ed25519 -C "your_email@gsi.de"

When asked, choose an ssh key password (and remember it).

When you have an ssh agent running (which is typically the case when loggin in with the graphical userinterface via rdp), then you can add your newly created ssh private key to the ssh agent with
ssh-add ~/.ssh/id_ed25519

This is optional but highly recommended. It saves you from entering your SSH key password every time git connects to gitea (which might be very often when doing e.g. maven releases).

Upload your public key to Gitea

To upload your public ssh key, please add a new key to your Gitea account by copying the contents of your id_ed25519.pub file to the corresponding text box: (Please note that the screenshots are a few days older and show the old rsa key, but the steps remain the same.)

git_add_ssh_key_1.png

git_add_ssh_key_2.png

Now you can continue with AppHowToGitInEclipseForBeginners
Topic revision: r6 - 12 Jan 2023, AndreasSchaller
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback