Configure Workspace
Install git for windows (Git Bash)
You can use everywhere the default settings except for the defualt editor, select there "Use Visual Studio code as Git's default editor"
Generate an ssh-key
1. Open "Git Bash" and type the following command to create an SSH-Key
ssh-keygen.exe -t <type> -b <bit ammount> -c <Your identifing comment>
# For example
ssh-keygen.exe -t ed25519 -b 4096 -C "janic @ windows pc"
2. Now you are prompted to enter the path to the key. You can use the default. (just press enter and do not enter anything)
3. Now you are prompted to enter a password for your key. The default is no password. (just press enter and do not enter anything)
4. Now you are prmpted to confirm your password, if you have entered none, just hit enter again.
Always use your custom ssh-key
3. List the content of this directory with the command ls
you should now see you custom key in here.
4. Create a config file which defines to always use your custom ssh-key you can use the command below
echo "IdentityFile ~/.ssh/<your ssh key>" > config
# For example:
echo "IdentityFile ~/.ssh/id_ed25519" > config
Add your Public SSH-Key to Gitea
1. Login to your gitea account
2. Click in the top right on your profile and there on "Settings"
3. Get the content of your public key
You can use the cat command to open the content of the public key.
cat <your public key>
# For example:
cat id_ed25519.pub
4.Follow the steps below
Go to "SSH- / GPG-Key"
Click on "add key"
Enter the name of this key
Enter the content of the public key
Click on "Add Key"
Configure Git
You need to set a default username and email for git. You can do this with the following commands
git config --global user.name "Name"
git config --global user.email "e@mail.com"
#For example:
git config --global user.name "Janic Voser"
git config --global user.email "janic@voser.cloud"