Gitlab is an amazing repository to develop and deploy your application in continuous integration. You can get more information about gitlab on Google but this article is just about the configuration and integration of Gitlab with Visual Studio 2019.
I was writing this because I am working on a project which I have to share with multiple developers and we are working in multiple Nations. So to integrate everyone’s changing in single repository we are using Gitlab as mid layer.
Download Git
First of all you need to install get in your machine, remember that get is totally free of post you can download from here. After successful installation of Git, now the next move is to install Gitlab extension in your Visual Studio 2019.
GitLab Extension for Visual Studio
- Open the extensions drop down, then click on manage extensions.
- Click online.
- Then search for “GitLab Extension for Visual Studio“ and download.
It will take couple of minutes to download and install this extension in your visual Studio 2019.
Generating Git SSH key
Now it’s time to generate your ssh key for successful configuration of gitlab.
If you are Windows user then you need to open your Bash CLI (CMD, Powershell). Execute the following command and get your key.
1 |
ssh-keygen -t ed25519 -C "email@example.com" |
- Then it will ask you for the name of file in which you want to store this key.
- Then you have to write the password if you want to protected the file.
Even that you can generate this key from Git GUI.
- Open Git GUI
- Click on Help
- Generate Key
Add Git SSH key in GitLab
After getting the key, it’s time to add this in your Git Lab Id.
- Just logged In and goto settings.
- On your left menu there is SSH Keys.
- Now paste the Git GUI Key here.
- Give meaningful title.
- Click Add Key.
Now we have successfully configured Git & Git Lab in windows. Next phase is to integrate this with Visual Studio 2019.
Integrate Git Lab in Visual Studio 2019
- Open your Visual Studio Team Explorer.
- Go to Settings.
- Go To Repository Settings
- Enter User Name & Email
- Done !
- Now you can add new repository by clicking on Add.
- Download Already existing projects by clicking on Clone.
Conclusion
Finally we are done with this tutorial. I hope it will give you a kick start with GitLab. Onward I’m working on WordPress to ASP.NET Core Migration Series in which I have used this approach. So interested techies can get copy of my work and purse their individual copies of code to next level solution.
Integrate GitHub With Visual Studio 2015
WordPress to ASP.NET Core Migration