How to connect Visual Studio 2015 to an existing Gitlab project?
There is an on-premise instance of gitlab installed. There are Visual Studio projects in this instance. What is the easiest way of connecting Visual Studio 2015 to one of the projects? With GitHub, you can do it by selecting «Connect to GitHub» as on the following picture: and then pasting the repository url. There is no GitLab option in the drop down. What is the easiest way of configuring Visual Studio 2015 to work with a solution from gitlab repository? By work I mean to have your usual source control bindings to the repository. Note, that this question is probably useful in more general context of connecting to any git repository that is not GitHub, and does not have direct support with built-in Visual Studio menu, not just to GitLab repository.
Andrew Savinykh
asked Feb 3, 2016 at 1:51
Andrew Savinykh Andrew Savinykh
25.5k 18 18 gold badges 103 103 silver badges 158 158 bronze badges
The following is a decent example: huber.xyz/?p=284
Dec 27, 2016 at 0:51
3 Answers 3
First, get the clone using command line:
git clone
Then in Visual Studio, in the Team Explorer pane, select the connect button and look for Local Git Repositories «tab»:

Press Add, as indicated on the picture, and select the folder you cloned your repository too.
When the process finishes, you can double-click the added repo to «connect» to it, and then select and open a solution it contains. After that follow your usual Visual Studio git workflow.
GitLab extension for Visual Studio
GitLab for Visual Studio supports GitLab Duo Code Suggestions.
Download the extension
Download the extension from the Visual Studio Marketplace.
Configure the extension
Instructions for getting started can be found in the project README under setup.
Report issues with the extension
Report any issues, bugs, or feature requests in the gitlab-visual-studio-extension issue queue.
Related topics
- Download the plugin
- Plugin documentation
- View source code
Help & feedback
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there’s something you don’t like about this feature.
Propose functionality by submitting a feature request.
Join First Look to help shape new features.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get Help
If you didn’t find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
How to Connect Visual Studio with Gitlab
Visual Studio is a platform that Microsoft developed for app creation. It uses platforms like Windows Forms, Windows Presentation Foundation, and Windows Store to develop new software solutions. As a free extension for Visual Studio, Gitlab offers managing tools to integrate, configure, and maintain your code.

In this article, we’ll explain how to connect Visual Studio with Gitlab, as well as suggest other great extensions for developers to use with this platform.
How to Connect the Tool
Instead of using multiple apps to follow your program’s whole life cycle, Gitlab can do all that work for you. Here’s how:
- Go to the Gitlab website or your Gitlab server.
- Type your email, username, and password.
- Use “GitLab ApiV4 Oauth2”.
If you’re willing to add an existing solution to GitLab, here’s the process:
- Open the code in Visual Studio.
- Open “File” and choose “Add to Source Control.”
- Find the “Team Explorer” tab and using “Local Git Repositories, click on three dots to navigate your project folder. Then click “Add.”
- On the top, you’ll have to open a dropdown menu and click on “Sync.”
- Under the “Gitlab,” find and click “Publish.”

Other Useful Virtual Studio Extensions
Glyphfriend
Glyphifriend is a Visual Studio 2017 extension that can enhance the Intellisense to display glyphs. You can easily find it and install it through the “Tools” area in Visual Studio – and that’s how Glyphfriend can become a part of your toolkit on VS.
After installation, this extension will successfully detect when a valid HTML flavored file is appended and add supporting icons.
File Icons
If you want to use file icons for specific file types, this extension is ideal for you. On File Icons, you can also suggest new icons for file types that you’re often using. That way, you’ll always know what kind of files you have in your folders.
File Nesting
File Nesting allows you to group files automatically and manually according to their names. You can also change the nesting rules and quickly apply them to your entire project or some of its parts. Its key features are:
- Manually nesting or unnesting files
- Auto-nesting based on different naming rules
- Auto-nesting for added or renamed files
Magical C# Debugging – OzCode
OzCode is a VS extension that makes your debugging process faster and more productive as its tracking down and isolating code bugs. This way, you can quickly fix them without losing precious time. OzCode gets integrated with the Visual Studio debugger to expand its features. With OzCode, you can predict future code functionality, have insights, and evaluate expressions.
The usual debugging process allows you to see how your app is functioning in the present. Every time you get to the breaking point, OzCode can evaluate your code lines and predict the result with a Heads-Up display.
OzCode even came up with a “Simplify” option that makes code visualizations for a developer to see which expressions are true or false instantly.
Import Cost
The Import Cost plugin is made for JavaScript and TypeScript, and it helps you keep track of new or recently added dependencies to your project. It can show you the size of dependence and help you with its management.
Project Manager
Managing multiple projects is never easy; that’s why this extension immediately creates a sidebar to make all your projects accessible. It helps you with Git, SVN, and Mercurial repositories and manages remote repositories as well. It’s possible to tweak all the Project Manager’s settings and customize the extension to work best for you.
SVG Viewer
SVG are usually text files that store vector images for the web. Since all of them are in text format, you’ll need a way to render those files in Visual Studio to see all the vector photos. It saves you a lot of time as you don’t have to switch apps to review what you’ve done.
Debugger for Chrome
Every developer that works with JavaScript has to test code in a browser. Chrome Dev Tools provides you with an effective way to debug any JavaScript through Chrome. Since Visual Studio can be integrated, many debugging features can save a significant amount of time and quickly identify code bugs without ever leaving VS.

SideWaffle Template Pack
This extension is offering project templates for building websites, Windows apps, and a lot more. All templates are written by talented developers to help Visual Studio users be more productive and create well-structured code.
Keep on Coding
Visual Studio enables developers worldwide to integrate their development tools with new apps to increase productivity and ensure they’re ready for launch. With an abundance of plugins and extensions, the core functionality of Visual Studio is continually growing.
Now that you’re able to connect Visual Studio with GitLab, you can use its features to be more successful at coding. That’s why many developers use it as it offers a lot more than the competition.
Was it easy to connect Visual Studio with GitLab? What are your must-have extensions for VS? Let us know in the comments section below.
Управление подключениями к исходному репозиторию
Центр приложений поддерживает подключения к следующим службам репозитория кода: Bitbucket, GitHub, Gitlab.com и Azure DevOps (ранее VSTS). Создавайте приложения в Центре приложений, подключаясь к одному из этих поставщиков. Обратите внимание, что SSH-подключение не поддерживается.
За исключением локальных экземпляров GitLab, Центр приложений не поддерживает подключения к локальным или локальным версиям указанных выше служб репозитория.
Bitbucket устанавливает ограничения частоты вызовов API как для запросов, не прошедших проверку подлинности, так и для запросов, прошедших проверку подлинности.
Подключение к исходному репозиторию
Чтобы создать приложение, подключитесь к учетной записи репозитория, выбрав службу на вкладке Сборка в приложении. Войдите, используя учетные данные учетной записи службы репозитория кода, если вы еще не вошли в систему. Для завершения подключения требуется авторизация Центра приложений.
Доступные репозитории будут заполнены в Центре приложений после успешного подключения. Выберите репозиторий и ветвь, в которых находится приложение, и настройте первую сборку.
Может потребоваться разблокировать build.appcenter.ms и build2.appcenter.ms разрешить агенту сборки подключиться к репозиторию. Возможные IP-адреса Azure.
Подключение к экземплярам Self-Hosted GitLab
Поддомены не поддерживаются, SSL-сертификат для экземпляра GitLab должен точно соответствовать. Пример: https://gitlab.my-company.com/ не может обслуживаться с помощью сертификата с подстановочными знаками для *.my-company.com .
Вы можете подключиться к локальному экземпляру GitLab, указав URL-адрес экземпляра, например , gitlab.my-company.com и личный маркер доступа (PAT). Выберите api область при создании pat для подключения к Центру приложений. Экземпляр должен быть доступен через Интернет. По истечении срока действия PAT любой администратор приложения Центра приложений может повторно подключить подключение с помощью pat. Измените параметры подключения в службе сборки при подключении репозитория или в разделе Учетные записи разработчика > параметров пользователя.
Удаление подключений и повторное подключение
Благодаря такому большому набору удостоверений, приложений и методов проверки подлинности ваша учетная запись Центра приложений может подключиться к службе, отличной от службы размещения приложений.
Если вы подключились к службе репозитория с неправильной учетной записью, необходимо открыть параметры пользователя в службе размещения (Azure DevOps, GitHub или Bitbucket) и отозвать маркер OAuth вручную. Затем вы можете повторно подключиться к другой учетной записи в Центре приложений.
Помните, что при подключении к новой учетной записи вы потеряете всю конфигурацию сборки и предыдущие сборки для всех приложений, настроенных с предыдущей учетной записью.
Bitbucket
Чтобы подключиться к другой учетной записи Bitbucket, сначала отмените токен OAuth. Перейдите в https://bitbucket.org/account/> раздел Управление доступом (авторизация приложений) > Отозвать маркер Центра приложений. Затем выйдите из Bitbucket. На вкладке Сборка Центра приложений снова подключитесь к Bitbucket и снова выполните поток OAuth.

GitHub
Если вы вошли в Центр приложений с учетной записью GitHub, вы можете создавать приложения только из репозиториев под этой учетной записью GitHub.
Чтобы подключиться к другой учетной записи GitHub, сначала отмените токен OAuth. Перейдите на веб-страницу> профиля GitHub Приложения > , авторизованные приложения OAuth, отозвать маркер Центра приложений > . Затем выйдите из GitHub. На вкладке Сборка Центра приложений подключитесь к GitHub и повторите поток OAuth.

Azure DevOps
Чтобы подключиться к другой учетной записи Azure DevOps, сначала отмените токен OAuth. Перейдите на страницу >Azure DevOps Me Управление авторизациями (см. снимок экрана ниже) > Отзыв маркера Центра приложений. Затем выйдите из Azure DevOps. На вкладке Сборка Центра приложений повторно подключитесь к Azure DevOps и снова выполните поток OAuth.
На потерю доступа маркера Azure DevOps может потребоваться до 60 минут. После истечения срока действия доступа можно подключить Центр приложений к другой учетной записи Azure DevOps.
