How to Clone a project from GitLab using Eclipse

HOME

What is GitLab?

GitLab is a web-based Git repository that provides free open and private repositories, issue-following capabilities, and wikis. It is a complete DevOps platform that enables professionals to perform all the tasks in a project—from project planning and source code management to monitoring and security.

In this tutorial, I will explain how we can clone a project from GitLab in Eclipse.

Implementation Steps

Step 1 – Go to GitLab and select the project which you want to clone. Click on the blue color “Clone” button then copy the hyperlink as shown in the image. You can either Clone with SSH or Clone with HTTPS.

Step 2 – Open Eclipse and go to “File > Import” in eclipse as shown in the image.

Step 3 – A window will pop up in which select Git Folder. Under the Git folder, select the option – “Projects from Git(with smart import)” as shown in the image.

Click on the “NEXT” button.

Step 4 – A new window will pop up in which select the option –Clone URI” as shown in the image.

Click on the “NEXT” button.

Step 5 – Another window will pop up in which you have to paste the “GitLab Repository URL” and also “GitLab UserID and Password” and click on the “Next” button.

URI – This is the URL that we have cloned from GitLab in Step 1.
Host – gitlab.com
Repository path – path of the project in GitLab (This is auto-populated after entering URI)

Authentication
User – Username of GitLab
Password – password of GitLab

Step 6 – Select master and selectWhen fetching a commit, also fetch its tags.

Click on the “Next” button.

Step 7 –  Select the “Folder directory” in which you want to import the repository.

Click on the “Finish” button.

Step 8 – We have successfully imported the GitLab Repository as shown in the below image.

Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!! Cheers!!

Leave a comment