azure-devops-intellij: Error when creating workspace if the user password contains non-cmd-friendly characters
(Edited by F.: please see the steps to reproduce and workaround below.)
I tried to use this plugin for the first time today and trying to create my local workspace failed with a crash. This is trying to connect to an organisation tfs server.
Repro Steps
- Open any IntelliJ based IDS (I used Rider for this)
- On the welcome screen, click on “Get from Version Control”
- Select “Respository URL”
- From the “Version control” drop down, choose “Azure DevOps TFVC”
- Click “Clone”
- In the “Checkout from Azure DevOps Services”, select the “Team Foundation Server” tab
-
- Enter your server URL
- Select a Repository and keep other default settings
-
- Click “Create Workspace”
- During this process, I had to accept the server’s certificate.
What should happen
The workspace is mapped on my machine and files starts to download into the specified folder. If the “Edit workspace” checkbox is checked, I would expect to chose what files will get downloaded.
What happened instead
After a bit of loading, the window closes bringing me back to the welcome screen. The Event Log icon on the bottom right appears red. Clicking on it shows an “IDE Fatal Error” with the following stack trace:
java.lang.RuntimeException: An error occurred: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.microsoft.alm.plugin.external.commands.Command.throwIfError(Command.java:423)
at com.microsoft.alm.plugin.external.commands.CreateWorkspaceCommand.throwIfError(CreateWorkspaceCommand.java:91)
at com.microsoft.alm.plugin.external.commands.CreateWorkspaceCommand.parseOutput(CreateWorkspaceCommand.java:73)
at com.microsoft.alm.plugin.external.commands.CreateWorkspaceCommand.parseOutput(CreateWorkspaceCommand.java:22)
at com.microsoft.alm.plugin.external.commands.Command$1.completed(Command.java:178)
at com.microsoft.alm.plugin.external.ToolRunner$ListenerProxy.completed(ToolRunner.java:295)
at com.microsoft.alm.plugin.external.ToolRunner$ProcessWaiter.run(ToolRunner.java:333)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
Commits related to this issue
- #323 enforce version check before any command — committed to IlyaGrigorievWeb/azure-devops-intellij by deleted user 4 years ago
- #323: code style fixes — committed to IlyaGrigorievWeb/azure-devops-intellij by ForNeVeR 3 years ago
- #323: better tool process termination; cleanup in tests — committed to IlyaGrigorievWeb/azure-devops-intellij by ForNeVeR 3 years ago
- #323: better tool process termination; cleanup in tests — committed to IlyaGrigorievWeb/azure-devops-intellij by ForNeVeR 3 years ago
- #323: better tool process termination; cleanup in tests — committed to IlyaGrigorievWeb/azure-devops-intellij by ForNeVeR 3 years ago
Alright, I was able to reproduce the issue.
Prerequisites:
^
).Steps to reproduce:
The error will be shown:
Investigation: the problem is that under some circumstances we pass the login/password pair through
cmd
on Windows, andcmd
is known for its really crazy rules of argument passing. Namely,^
character is escape character in some contexts.Workaround: the workaround here would be to switch the command-line client code to the so-called “fast-mode” (which isn’t so fast, but still). I’ll copy the information from my previous take on the issue, https://github.com/microsoft/azure-devops-intellij/issues/252#issuecomment-544838137:
I have verified that this workaround works in my case (with unusual character in password).
Thanks for help. Do you use on-premise installation of TFS/Azure DevOps server with HTTPS support? In that case, you’ll have to install your server’s certificate into our JVM (we’re working on a fix for that, but for now it’s a requirement).
Take a look at this article, “Importing the certificate” section.