,

How to do git clone without installing git in WSL (Windows Subsystem for Linux)

Posted by

In this Article i m going to share the step by step guide to git clone in Windows Subsystem for Linux Ubuntu server.

First of all one of the major question is raised that is installing git is necessary to git clone in Windows Subsystem for Linux Ubuntu server.
Answer is –

No, installing Git within the Windows Subsystem for Linux (WSL) is not required in order to clone a Git repository. Without installing it within WSL, you may use Git via a GUI client or the Windows command prompt.

Nevertheless, you may install Git within WSL to clone repositories and carry out Git activities directly in that environment if you want to work in the Linux environment that WSL offers. If you wish to utilize Linux commands and tools, this could be useful.

How to clone git repository is WSL (Windows Subsystem for Linux) ?

Step – 1 : First go to the directory where you want to clone the git repo.

Step – 2 : you can directly run the git clone command if your ssh key is already set in the git hub.

git clone git@github.com:git-repo-for-your-project.git

These are the only steps for the git clone.

If your SSH key is not set in your github then follow the below process.

How to add SSH Key in your github in WSL (Windows Subsystem for Linux)?

Here are the steps to add your SSH Key in your github in WSL.

Step – 1 : Go to your root directory.

Step – 2 : Run this command to generate your ssh key for your github account.

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Step – 3 : Run the command as follow, and then add the SSH key to the ssh-agent:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Step – 4 : Copy the contents of the public key (id_rsa.pub) to your clipboard:

cat ~/.ssh/id_rsa.pub

Step – 5 : Activate the duplicated key on your GitHub profile. Add a new SSH key by going to your GitHub account settings, selecting “SSH and GPG keys,” and then finish.

Step – 6 : Run the Below command to verify the connection to github:

ssh -T git@github.com

Step – 7 : Run your git clone command to clone any repo from github in WSL (Windows Subsystem for Linux).

Subscribe
Notify of
guest
8 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Amit Kumar
Amit Kumar
7 months ago

Good tutorials..

Maruti Kumar
Maruti Kumar
7 months ago

Wow! This blog post brilliantly encapsulates git repository in a comprehensive yet engaging manner. The way you “SSH key is not set in your github truly” makes it stand out.

Rajesh
Rajesh
7 months ago

Good Content on WSL for git. But what is WSL and How it works? I think title is confusing for me.

Dolly K
Dolly K
7 months ago

I have shared this with my juniors. I think they will find this type of information useful. By the way, thanks for sharing!

Anup rajak
Anup rajak
7 months ago

Thanks for sharing..by the way nice content on wsl for git…

trackback

viagra online without a prescription

How to do git clone without installing git in WSL (Windows Subsystem for Linux) – DevSecOps Now!!!

trackback

best rated essay writing service

How to do git clone without installing git in WSL (Windows Subsystem for Linux) – DevSecOps Now!!!

trackback
6 months ago

homework essay help

How to do git clone without installing git in WSL (Windows Subsystem for Linux) – DevSecOps Now!!!

8
0
Would love your thoughts, please comment.x
()
x