blog.majcica.com Open in urlscan Pro
2a01:238:20a:202:1159::  Public Scan

URL: http://blog.majcica.com/2017/01/02/working-with-tfs-in-intellij-idea-via-vsts-plugin/
Submission: On May 03 via manual from US — Scanned from DE

Form analysis 2 forms found in the DOM

POST http://blog.majcica.com/wp-comments-post.php

<form action="http://blog.majcica.com/wp-comments-post.php" method="post" id="commentform" class="comment-form">
  <p class="comment-notes"><span id="email-notes">Your email address will not be published.</span> <span class="required-field-message" aria-hidden="true">Required fields are marked <span class="required" aria-hidden="true">*</span></span></p>
  <p class="comment-form-comment"><label for="comment">Comment <span class="required" aria-hidden="true">*</span></label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="15360" required="" minlength="15"></textarea></p>
  <p class="comment-form-author"><label for="author">Name <span class="required" aria-hidden="true">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" required=""></p>
  <p class="comment-form-email"><label for="email">Email <span class="required" aria-hidden="true">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" required=""></p>
  <p class="comment-form-url"><label for="url">Website</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200"></p>
  <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"> <label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time
      I comment.</label></p>
  <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="1073" id="comment_post_ID">
    <input type="hidden" name="comment_parent" id="comment_parent" value="0">
  </p>
  <noscript><input type="hidden" name="JS04X7" value="NS1"></noscript>
  <noscript>
    <p><strong>Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page.</strong>
      <a href="http://enable-javascript.com/" rel="nofollow external">Click here for instructions on how to enable JavaScript in your browser.</a></p>
  </noscript>
</form>

GET http://blog.majcica.com/

<form role="search" method="get" class="search-form" action="http://blog.majcica.com/">
  <label>
    <span class="screen-reader-text">Search for:</span>
    <input type="search" class="search-field" placeholder="Search …" value="" name="s">
  </label>
  <input type="submit" class="search-submit" value="Search">
</form>

Text Content

Skip to content


MUMMY'S BLOG


AS MOTHER MADE IT – MARIO MAJČICA'S WEB LOG

 * About Mario Majčica
 * Contact Me


WORKING WITH TFS IN INTELLIJ IDEA VIA VSTS PLUGIN

Recently Microsoft released a plugin for JetBrains IntelliJ IDEA in order to
integrate this IDE with VSTS and TFS. Although Microsoft did a good job
describing on how this plugin should be installed and described some basic
settings, there are many non covered questions by the documentation provided.
This is especially true when it comes to TFS and HTTPS. I will show you what is
necessary in order to setup a connection for both Git and TFVC repositories on
TFS.


INSTALLING THE PLUGIN

In order to install the plugin, in the main screen of IDEA, choose Plugins from
Configure menu:



Once the plugin window opens, choose Browse repositories



In browse repositories search for Visual Studio



If the Visual Studio Team Services plugin is not found, your connection may not
be setup correctly. In case you are, as I am, behind a proxy, you need to click
on HTTP Proxy settings button in the same screen (bottom left) and you will be
presented with the following dialog



Here you need to setup the necessary parameters (Auto detect proxy settings
worked for me) and test your connection by clicking on Check connection button.
Once done you will be prompted to enter an address that is behind the proxy so
that internet connection can be verified. I used http://www.google.com/ for my
test.



After confirming, you should see the following message



Now, back to Browse repositories screen, the Visual Studio Team Services plugin
now should be found. Click on install and after the procedure finishes you will
be asked to restart IntelliJ IDEA. Do so, restart the IDE.



The plugin is now installed. In case this is not sufficiently clear, you can
also follow the Microsoft guide Visual Studio Team Services Plugin for IntelliJ
IDEA and Android Studio.

Be also sure that you have at least version v1.111.0 installed as I encountered
issues with TFVC and previous versions of the plugin.


IMPORTING THE CERTIFICATE

In case you are not accessing TFS through SSL connection you can skip this part.
For Visual Studio Team Services plugin to connect to the TFS via https, that is
using a self-signed certificate, no matter if you do intend using Git or TFVC,
you need to import the certificate in the IntelliJ IDEA certificate store. To do
so, export your certificate in the Base-64 encoded X.509 format. You can read
about this in one of mine previous posts, Installing self-signed certificates
into Git cert store.
Once you exported your certificate and let’s say saved it in C:\temp folder
under the name tfs.cer, you need to open the command prompt and position
yourself under the folder containing keytool.exe application. You can find it in
the IntelliJ IDEA install folder, which in my case is C:\Program Files
(x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3.1\jre\jre\bin.

Once there you will then execute the following command

keytool -keystore "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community
Edition 2016.3.1\jre\jre\lib\security\cacerts" -importcert -alias TFS -file
"C:\temp\tfs.cer"

You will be then prompted for the keystore password. If you haven’t changed it,
the default password is

changeit

After typing the password you will see the details about the certificate you are
trying to import, and again you will be prompted to confirm that you trust this
certificate. Type yes and you are done. Your screen should look like this




VISUAL STUDIO TEAM SERVICES PLUGIN AND GIT

Before we even start, we need to be sure that a Git client is installed on our
machine. From the Welcome screen choose Configure then Settings.



In the settings window move to Version control -> Git pane and test the path to
your Git client



In case all is good you should get back the version of your Git client



If this is not the case, or the path is wrong (change it and try again) or the
Git client is not present on your machine. You can install Git for windows and
you will find the necessary here.

In case you are using the https connection with TFS and it is based on a
self-signed certificate do not forget to add that certificate into the Git cert
store. This is something different then adding it to the Java cert store that I
described in the previous chapter. You will need to do both of these steps. As I
already described this procedure in detail, you can follow my other blog post
Installing self-signed certificates into Git cert store.

Once the Git client is installed and certificate is imported, we can continue
setting up the Visual Studio Team Services plugin. Get back to the welcome scree
of IntelliJ IDEA and in the version control drop down choose Team Services Git



At this point a new dialog will be presented to you.



Move to the Team Foundation Server tab and specify the address of your TFS
server, then click connect. You will now be prompted for the credentials and if
everything is ok, you will be show the list of available repositories



You are now able to clone the repository of your choice and start working with
it directly from IntelliJ IDEA.


VISUAL STUDIO TEAM SERVICES PLUGIN AND TFVC

Before starting with TFVC, as for Git, we need an external tool. The tool in
question is TF command line tool. It ships with the Microsoft Team Explorer
Everywhere 2015 and you can download it here.
The file we are interested in is TEE-CLC-14.0.3.zip. Download it and unzip it in
a folder of your choice. You should end up with something similar to this.



Now, open the command prompt, move into the folder where you have extracted the
TF command line tool and run the following:

tf eula /accept

If command succeeded and you haven’t received any error, you are good to go.



Now back to IDEA. Open the settings panel.



and move to Version Control -> TFVC pane. In the select path to executable
field, enter the exact path to the tf.cmd command file located in TF command
line tool folder.



Once done, press the test button and you should see the following message



Confirm all of the open windows and get back to the IDEA welcome page. Now you
are ready to choose Team Services TFVC (Preview) version control.



At this point, same as for Git, you will be prompted about the connection
towards your TFS. The following dialog will be shown.



Move to the Team Foundation Server tab and specify the address of your TFS
server, then click connect. You will now be prompted for the credentials and if
everything is ok, you will be shown the list of available TFVC repositories.



You can now create a new workspace directly from IDEA and start working with
your TFVC repositories.


TROUBLESHOOTING

There are a couple of common issues you may encounter in following what I just
described. I will tell you about the most common ones and how to overcome those.

In case you see the message in the following screenshot



You are probably facing some issues with the certificate. Make sure that you
exported/imported the certificate correctly.

During the test of the TF command line utility, you may encounter the following
exception



In may case it turned out to be a problem with allocating the heap memory from
TF process. I could clearly see in the log file the following:

2016-12-22 13:14:08,949 [ 17642] INFO - ugin.external.commands.Command -
167680800(ns) - elapsed time for add -noprompt -?
2016-12-22 13:15:46,592 [ 115285] INFO - lugin.external.ToolRunnerCache -
getRunningToolRunner: toolLocation={0}
2016-12-22 13:15:46,592 [ 115285] INFO - lugin.external.ToolRunnerCache -
getRunningToolRunner: slow version - null
2016-12-22 13:15:46,592 [ 115285] INFO - alm.plugin.external.ToolRunner -
ToolRunner.start: toolLocation = C:\Utils\TEE-CLC-14.0.3\tf.cmd
2016-12-22 13:15:46,592 [ 115285] INFO - alm.plugin.external.ToolRunner -
ToolRunner.start: workingDirectory = null
2016-12-22 13:15:46,592 [ 115285] INFO - alm.plugin.external.ToolRunner -
arguments: add -noprompt -?
2016-12-22 13:15:46,716 [ 115409] INFO - ugin.external.commands.Command - CMD:
Error occurred during initialization of VM
2016-12-22 13:15:46,717 [ 115410] INFO - ugin.external.commands.Command - CMD:
Could not reserve enough space for 2097152KB object heap
2016-12-22 13:15:46,731 [ 115424] WARN - ugin.external.commands.Command - CMD:
parsing output failed
com.microsoft.alm.plugin.external.exceptions.ToolBadExitCodeException:
KEY_TF_BAD_EXIT_CODE
at
com.microsoft.alm.plugin.external.tools.TfTool.throwBadExitCode(TfTool.java:109)
at
com.microsoft.alm.plugin.external.commands.Command$1.completed(Command.java:155)
at
com.microsoft.alm.plugin.external.ToolRunner$ListenerProxy.completed(ToolRunner.java:289)
at
com.microsoft.alm.plugin.external.ToolRunner$ProcessWaiter.run(ToolRunner.java:327)

A workaround for this issue is to modify the tf.cmd file by specifying a lower
-Xmx parameter. By default it is set to 2014MB however a 1024MB also worked well
for me.

Another issue with this version of Visual Studio Team Services plugin is in
changing in between the Team Services TFVC (Preview) and Team Services Git, or
viceversa. You can read more about it here, TfsAuthenticator hangs the IDE.

No matter the issue, you can always find more information about it in the log
file. The log file is located in my case in
C:\Users\majcicam\.IdeaIC2016.3\system\log. Adapt this path to your case. The
log file name is idea.log.
Visual Studio Team Services Plugin settings can be found in vsts_settings.xml
file under C:\Users\majcicam\.IdeaIC2016.3\config\options folder.


USEFUL LINKS

On visualstudio.com you can read more about this topic and see some useful
how-to video.

 1. Installing Visual Studio Team Services Plugin for IntelliJ IDEA and Android
    Studio
 2. Using Visual Studio Team Services Plugin for IntelliJ

With all of these information I do hope you can get on going with the plugin and
boost your productivity.

Happy coding.

TwitterLinkedInFacebookWhatsAppShare

Tagged as: authntication, certificate, Git, https, Team Foundation Server, tf,
TFS, TFS 2015, TFVC, Visual Studio Team Services Plugin

Categorized in: IntelliJ IDEA, TFS, Uncategorized

January 2, 2017 Mario MajcicaNo Comments


POST NAVIGATION

Installing self-signed certificates into Git cert store
TFS Tips from the Trenches


LEAVE A REPLY CANCEL REPLY

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.



Currently you have JavaScript disabled. In order to post comments, please make
sure JavaScript and Cookies are enabled, and reload the page. Click here for
instructions on how to enable JavaScript in your browser.

© 2015 Mario Majčica All Rights Reserved

Decode Theme by Macho Themes

Search for:


RECENT POSTS

 * Signing Git Commits
 * Building Visual Studio projects with DevEnv.com
 * Starting a TFS release via REST API
 * Azure DevOps extension for XL Deploy
 * Download a file with TypeScript
 * Node10 provider available for Agent v2.144.0
 * Uploading XL Deploy DAR package via TypeScript
 * Living Documentation and test reports in VSTS/TFS pipelines
 * Deploy SSIS packages from TFS/VSTS Build/Release
 * Provisioning WebDeploy in VSTS/TFS release via DSC script
 * Using global application host file in Visual Studio 2015+
 * Get Users SID with PowerShell
 * Joining strings in pipeline
 * Automate setting ‘Retain indefinitely’ flag on your releases
 * Uploading build/release tasks to VSTS
 * Managing VSTS/TFS Release Definition Variables from PowerShell
 * Using Windows Machine File Copy (WinRM) VSTS extension
 * (no title)
 * Persisting sensitive information with PowerShell
 * TextTransform issues after VS Project Upgrade
 * XL Deploy in VSTS/TFS build/release pipelines
 * Using Git with self-signed certificate at the user level
 * VSTS/TFS Agents behind a proxy
 * TFS Tips from the Trenches
 * Working with TFS in IntelliJ IDEA via VSTS Plugin


CATEGORIES

 * .NET (19)
   * ASP.NET (6)
   * C# (14)
   * DevExpress (3)
   * Moq (1)
   * MSTest (2)
   * TPL (1)
   * WCF (2)
 * Articles (15)
 * Azure DevOps (4)
 * Best Practice (12)
 * Cisco (1)
   * IOS (1)
 * CodedUI (5)
 * Cryptography (4)
 * Development (4)
   * SQL (2)
 * Git (2)
 * Hardware (1)
 * IIS (2)
 * IntelliJ IDEA (1)
 * JavaScript (1)
 * Networking (1)
 * News (1)
 * Nexus (3)
 * NodeJs (2)
 * PowerShell (13)
 * Security (9)
 * SonarQube (3)
 * SpecFlow (2)
 * Testing (5)
 * TFS (29)
   * TFS 2015 (12)
   * TFS 2017 (4)
 * Tips and Tricks (2)
 * TypeScript (3)
 * Uncategorized (42)
 * Unit test (4)
 * Visual Studio (12)
   * Nuget (2)
   * Templates (1)
   * VSIX (3)
 * VSTS (9)
 * Windows 8 (1)
 * WiX (1)
 * XebiaLabs (7)
   * XL Deploy (5)
   * XL TestView (2)


META

 * Log in
 * Entries feed
 * Comments feed
 * WordPress.org

✓
Thanks for sharing!
AddToAny
More…