1. Home
  2. Git
  3. Git Tutorial
  4. Git – Clone Repository

Git – Clone Repository

In this git tutorial, You will learn how to make a clone of remote repository on local system. This will copy all the application files available on remote sever to local system where you can start working.

#1. Generate SSH Key Pair

To connect git server, you may need to configure key based login. So that it will not prompt for each time you connect to server.

#2. Copy Public Key to Remote Server

Now copy newly generaed public key (~/.ssh/id_rsa.pub) on git server under git account. Use the following command to do it.

#3. Clone Remote Repository on Local

Now use the following command to make a clone of remote git repository on local system.

To verify remote url in local copy of code use following command. In results you will see two urls one for fetch and one for push operations.

Tags , ,
Was this article helpful to you? Yes 1 No