command line get command fails
Moderator: SourceGear
command line get command fails
Hello, I'm using Source Gear Vault 3.5.1.
I need to write a script to get files from Vault.
So I've written the script:
"C:\Program Files\SourceGear\Vault Client\vault.exe" -user "Username" -password "" -host "IPaddress" -workingfolder "D:\TTT\_dev\script1" -repository TTT get $/_dev/script > "D:\LOG\vaultTTT.log"
After running the script I've got the following log file:
<vault>
<error>
Proxy Authentication failed.
</error>
<exception>
System.Exception: Proxy Authentication failed.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
All the settings from the above script are correct: the user name, empty password, host name. The working folder, repository and the path '$/_dev/script' exist.
There are no problem to get latest version or to get files/dirs if I don't use command line.
So what could be the reason of such fail for command line?
I need to write a script to get files from Vault.
So I've written the script:
"C:\Program Files\SourceGear\Vault Client\vault.exe" -user "Username" -password "" -host "IPaddress" -workingfolder "D:\TTT\_dev\script1" -repository TTT get $/_dev/script > "D:\LOG\vaultTTT.log"
After running the script I've got the following log file:
<vault>
<error>
Proxy Authentication failed.
</error>
<exception>
System.Exception: Proxy Authentication failed.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
All the settings from the above script are correct: the user name, empty password, host name. The working folder, repository and the path '$/_dev/script' exist.
There are no problem to get latest version or to get files/dirs if I don't use command line.
So what could be the reason of such fail for command line?
So what could be the reason of such fail for command line?
It probably has something to do with this error message:
Your GUI client may be set up to handle proxy authentication, but this needs to be added to your script. You can check the proxy settings in your Vault GUI client under Tools->Options->Network settings.Proxy Authentication failed.
If you look at the CLC documentation (from the command line in the the Vault client directory, type "Vault help get"), you'll see additional options, such as:
-proxyserver
-proxyport
-proxyuser,
etc.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Another type of error:
set VaultPath=C:\Program Files\SourceGear\Vault Client
set VaultUser=Dmitry_Polyakhov
set VaultHost=SVRFREJA
set Vault="%VaultPath%\vault.exe"
%Vault% -user "%VaultUser%" -password "" -host "%VaultHost%" -workingfolder D:\LOG -repository TTT get $/_dev/doc >> "D:\LOG\ex.log"
I get LOG:
<error>
The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://SVRFREJA/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The underlying connection was closed: The remote name could not be resolved.
</error>
<exception>
System.Exception: The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://SVRFREJA/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The underlying connection was closed: The remote name could not be resolved.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
If I change slashes "get $/_dev/doc" to get "$\_dev\doc "
I get LOG
<vault>
<error>
Invalid repository path: $\_dev\doc
</error>
<result success="no" />
</vault>
The repository exeists and the path in the repository exists too.
What can cause such error?
set VaultPath=C:\Program Files\SourceGear\Vault Client
set VaultUser=Dmitry_Polyakhov
set VaultHost=SVRFREJA
set Vault="%VaultPath%\vault.exe"
%Vault% -user "%VaultUser%" -password "" -host "%VaultHost%" -workingfolder D:\LOG -repository TTT get $/_dev/doc >> "D:\LOG\ex.log"
I get LOG:
<error>
The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://SVRFREJA/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The underlying connection was closed: The remote name could not be resolved.
</error>
<exception>
System.Exception: The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://SVRFREJA/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The underlying connection was closed: The remote name could not be resolved.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>
If I change slashes "get $/_dev/doc" to get "$\_dev\doc "
I get LOG
<vault>
<error>
Invalid repository path: $\_dev\doc
</error>
<result success="no" />
</vault>
The repository exeists and the path in the repository exists too.
What can cause such error?
Invalid repository path: $\_dev\doc
This is invalid because the repository path is $/_dev/doc.
Verify that the CLC is version 3.5.x.
Also, try running the get command on the Vault Server machine itself, using "localhost" for the servername:
Try using -destpath to get to a non-working folder, just for a test:
"C:\Program Files\SourceGear\Vault Client\vault.exe" GET -user "Username" -password "" -host "localhost" -destpath "D:\TTT\_dev\script1" -repository "TTT" "$/_dev/script"
(Note: I've edited out the actual connection info from your post.)
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
[1/17/2007 7:36:26 PM] Version Check: This Vault client is version 3.5.1.4786Verify that the CLC is version 3.5.x.
[1/17/2007 7:36:26 PM] Version Check: Your Vault server is version 3.5.1.4786
It's not a convinient variant to run the script on the host machine because it's the remote server.Also, try running the get command on the Vault Server machine itself, using "localhost" for the servername:
I've tried to use destpath instead of working folder, also I've tried not to set working folder or destpath at all i.e. "get latest version".Try using -destpath to get to a non-working folder, just for a test:
The result was the same:
<error>
The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://SVRFREJA/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The underlying connection was closed: The remote name could not be resolved.
</error>
I've also tried to modify the script:
"C:\Program Files\SourceGear\Vault Client\vault.exe" GET -user "Username" -password "" -host "SVRFREJA.pdc.xx" -destpath "D:\TTT\_dev\script1" -repository "TTT" "$/_dev/script"
But it caused error message of wrong proxy authentication.
It is very hard to tell what's happening here without getting the network out of the equation. Whether or not Vault is configured to use a proxy server, if your network wants to run communication through one, you will be stuck having to configure Vault for that.
I think it would be best to start from the beginning on troubleshooting. If any step fails, stop right at that step and let me know the results.
I think it would be best to start from the beginning on troubleshooting. If any step fails, stop right at that step and let me know the results.
- 1) Open a web browser and verify that you can bring up the page http://<your vaultserver>/vaultservice
2) In the same web browser try http://<your vaultserver>/vaultservice/vaultservice.asmx
3) Open a Vault GUI client and confirm that you can connect to the server and manipulate files.
4) Find out if there is a proxy on your network. Vault cannot auto-detect that, so you will need to find out.