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.
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 Git folder, select option – Projects from Git(with smart import) as shown in the image. Click the NEXT button.
Step 4 – A new window will pop up in which select 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 project in gitlab (This is auto populated after entring URI)
User – Username of GitLab
Password – passowrd of GitLab
Step 6 – Select master and select “When fetching a commit, also fetch its tags”. Click the “Next” button.
Step 7 – Select the Folder directory in which you want to import the repository and click 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!!