Can you login using scm repositories.txt file using java api
![]()
Can you login using scm repositories.txt file using java api?
can we pass this line to RTC using the java api? https://localhost:9443/jazz/,,FRED,idmWThOyq8k= |
7 answers
![]()
What's your use case?
Not easily. You could reuse the internals of the commandline interface to get the RepositoryRegistry and extract the record you care about, but that isn't published API so it could change without warning. |
![]()
I am using two types of automation one with scm and one with java api.
I would like to use the scm config file repositories.txt file to get the url,user and password for both. Is it possible?? |
![]() I would like to use the scm config file repositories.txt file to get the url,user and password for both. In that situation I would store the password in another url/user/pw in another location and run 'scm login' with the at the start of the stuff that involves the CLI. The repositories.txt file is readable, but it should be considered API. We're likely to change it in future releases. e |
![]()
if I run from the command prompt
scm --config c:\tmp\login login. you are saying with I run my java script I do not have to run jdk1.5.0_13\bin\java.exe -Djava.ext.dirs=jdk1.5.0_13\jre\lib\ext;RTC_plainjava_lib;Common\lib;. bdd_update.CmdRequest repo.login() I don't think that will work??? |
![]()
I'm sorry, I don't follow your question.
I suggest that you store the url/username/password in a file of your own. When you want to run the CLI, you consult that file and run 'scm login' at the start of your script, with the fields set appropriately. When you want to use the plain java libraries, you get the url/username/password yourself and set them as appropriate. In other words: don't try and use repositories.txt to store your credentials. |
![]()
so I store the password unencrypted or encrypted by me.
basicaly two password file which could be out of sync..... not a great solution........but if that all that can be done.....I will have to live with it |
![]()
So long as you run an 'scm login' with the credentials from your file, there's no risk of being out of sync.
e |