Skip to main content
1-Visitor
May 8, 2015
Solved

prevent si asking for credentials in CLI

  • May 8, 2015
  • 1 reply
  • 3075 views

Hello,

Is there a way to prevent SI to ask for credentials in command line interface (batch file) when the user is already logged in MKS Integrity??

This is the case:

ComputerA:

from a CMD window, using a batch file, the user runs the si command:

si viewsandbox --fields workingrev --filter file:filename

Result: filename is retrieved

ComputerB:

same steps but in this one the Result is to insert "user" and "password"

In both computers, the user is logged in using MKS Integrity Client.

My questions is why in ComputerB "si" is asking for credentials?? is it a configuration?

How could I avoid it?

I tried the following commands:

si viewsandbox --fields workingrev --batch --filter file:filename

[[Cannot ask for user input in batch mode; must use the option --user]]


si viewsandbox --fields workingrev --gui --filter file:filename

[[Credentials are not requested but a bunch of annoying mks integrity client windows are opened for each file requested]]


Any idea??


Thank you!

    Best answer by awalsh

    The username and password, as well as whether to prompt, are configuration settings for each client. To check the preferences for connection, select File > Preferences, then choose Configuration Management > Connection:

    preferences.png

    To avoid the prompt, the user either has to remove the setting on prompt, or you need to add --user in the command.

    1 reply

    awalsh5-Regular MemberAnswer
    5-Regular Member
    May 11, 2015

    The username and password, as well as whether to prompt, are configuration settings for each client. To check the preferences for connection, select File > Preferences, then choose Configuration Management > Connection:

    preferences.png

    To avoid the prompt, the user either has to remove the setting on prompt, or you need to add --user in the command.

    1-Visitor
    May 19, 2015

    Best practise is to connect first using si connect --gui and then use the --user option in all CLI commands. Then the user won't be asked anymore to enter login credentials/password.