See here - https://aaneloy.github.io/Github-SSH-windows-11/
Setting up SSH for Windows 11 is very similar to Windows 10 (Sometimes it gets complicated). But let’s get a simplt method to do it.
choco install git -Y
git config --global user.name "your-github-username"
git config --global user.email "your-github-email"
Open the Git bash and type in:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
eval $(ssh-agent -s)
then
ssh-add ~/.ssh/id_rsa
After step 2, We need to copy the ssh key to integrate with GitHub. The easiest way is to use clip option:
clip < ~/.ssh/id_rsa.pub
We have our ssh key now. The next step is to add this to GitHub. Follow step by step:
settingsSSH and GPG Keysssh KeyKey option just paste the ssh key you just copied.add ssh keyvoilà! You have added the SSH key for Github and your Windows 11. If you want to test the SSH key, Simply clone a repository using ssh option and push some changes using Git Bash.