Ubuntu under windows 10 (WSL) and get GitHub to work without using git bash

I never liked Git Bash to use with GitHub. It’s a bit like using an add on, where macs and Linux worked natively.

I thought we have Ubuntu on windows using the WSL works really well for my network tools, why can’t I use that for GitHub as well. It’s bit tricky to get this working.

Here is the steps 1st you need to change the home directory

Ubuntu type sudo nano /etc/passwd

  1. Find your account’s line, which might look like:
  2. Change the home directory, which above is /home/din100, to the new directory, using WSL notation (If you want to set Windows directory as home directory, you need to prepend it with /mnt/c/Users/din100/Documents
  3. Re-launch the ubuntu on windows home directly will show the above if type pwd

Now follow the steps from here for Linux

when you try to add the keys to the ssh agent you will get a message

Permissions 0777 for 'privkey.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.ssh-add ~/.ssh/id_ed25519

even when do

chmod 600 /.ssh

It wont update the permission

Go to  sudo /etc/wsl.conf If the file doesn’t exist just create it

add the following

options = "metadata"

Save the file reboot your machine then run

chmod 600 /.ssh

you are good to go