Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to hide username and password in scm command via ant script

Hello All,

I have created a ant script for creating snapshot baselines in RTC. I don't want to show the username and password parameters.

Is anyone aware it can be achieved?

Thanks in advance.

Regards,

BalaMurugan S

1 vote

Comments

In an ant script you can pass through the password while executing the script.

You can use input tag for reading the input and parsing through the script where ever password variable declared in the script.



One answer

Permanent link
In the machine where you are running the ant script, run 'scm login' command in the terminal. This will create a configuration directory in the users <home directory>/.jazz-scm. If you look under the .jazz-scm directory, you will find a file called repositories.txt that has the encrypted password.
Any command (or script) that runs against the repository that was cached (after login) will use that credentials to contact the repository.
If you want change the configuration directory, you can provide the --config option to the scm tool. For ex: scm --config <some location> login ...
From then on all the commands should use scm --config <location> <command> .... to use the credentials cached in that location or set the env var SCM_CONFIG_DIRECTORY to that location and run the commands as usual without the --config option.
Note: The password caching provides a convenient way to run commands without specifying the username and password on every invocation of the command. Although the password is encrypted it should be cached in a secure location.
 

2 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 06 '15, 11:31 p.m.

Question was seen: 6,344 times

Last updated: Feb 19 '15, 4:34 a.m.

Confirmation Cancel Confirm