It's all about the answers!

Ask a question

Password File as a argument to the command


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

Hi

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.6k1534) | 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

http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m6/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Flogin.html

permanent link
Shashikant Padur (3.9k27) | answered Jun 30 '14, 11:31 p.m.
JAZZ DEVELOPER
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.