It's all about the answers!

Ask a question

Password File as a argument to the command

nanda S (201619) | asked Jun 30 '14, 10:05 a.m.
edited Jul 01 '14, 12:51 a.m.


I am trying to pass an argument to the command

scm login -r https:\\xxx -u urserID -P c:\PasswordFile.txt

It shows Error


What is the solution for passing a Password File(.txt with encrypted password in it)

instead of a password(i.e. string).

2 answers

permanent link
Piotr Aniola (3.7k11738) | answered Jun 30 '14, 10:26 a.m.
I'm not sure if this is exactly what you had in mind, but you can use the --certificate switch to provide the file that contains the user's login certificate

permanent link
Shashikant Padur (4.2k27) | answered Jun 30 '14, 11:31 p.m.
edited Jun 30 '14, 11:31 p.m.
You cannot pass a file to the -P option. If you do not want to enter the password in clear text then do not specify the option. The cli will prompt for the password and the password is masked. You may need to use the -c option if you want to cache the password. The encrypted password is stored in a file and by default it is stored in the <users home directory>/jazz-scm location. You can change the configuration directory by specifying the --config option.

If you plan to use it in the script, before you run the script login via the command line and then run the script without the -u and -P option. When the commands are run (on the command line or within a script), the cli will look for the repository url (implicit determined or explicit specified) and refer to the cached credentials for that repository url to login to the repository.

By the way, there is already a workitem opened to accept a password file.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.