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

problem with the lscm load command

Hello

I want to write a lscm batt script that load a workspace. Therefor I have written following script

call lscm login -r https://jazzserver/ccm -u wassermann -n jazzserver
call lscm load -r jazzserver  "Wassermann Workspace"
call lscm logout -r jazzserver

When I run this script, the first line works fine, the scm tool ask me for my password. But the second line ask me for my password again. If I enter my password again the connection is refuse because it already exists.

Did anybody see what is wrong with the script? Why didn't the load command use the connection I had created with the login command? Or ist this still a bug in version 4.0 (we migrate to 4.0.1 on Monday)

Thanks, and regards,
Martin

0 votes


Accepted answer

Permanent link
If you use the "-c" option, it will prompt for your password and cache it.

Help for: lscm login
Purpose: Stores the credentials to use when logging onto a repository.
Usage: lscm login [options] 

Options:
  --certificate arg          - The file that contains the user's login
                               certificate.
  --smartCard                - Uses the connected smart card for
                               authentication.
  -c [--cache]               - Caches the password on prompt. 
  -n [--nickname] arg        - The nickname of the repository.
  -P [--password] arg        - The password for the repository. 
  -r [--repository-uri] arg  - The URI that specifies the location of the
                               repository.
  -u [--username] arg        - The username for the repository.
Martin Wassermann selected this answer as the correct answer

0 votes

Comments

Thanks, that helps a lot. But does the lscm tool need a new login for every singel command or is it possible really to reuse one existing login?

What about the performance if lscm need to login for every command?

I'm not sure what you mean by needing a new login. The password is cached so you don't have to enter it again. You're also using the "-n" option to cache the repository. When you specify the nick for the repository, it will use the username and cached password when you ran the login command.


The lscm invocation launches a daemon so that subsequent calls will be faster. Using scm doesn't launch a daemon so the overhead of running commands with it will be higher. Depending on your use, you may want to use scm if you don't want any daemon running (and tracking a sandbox) after your command is executed.

1 vote


2 other answers

Permanent link
When I just run the scm command and not the lscm-batch without the login before
scm load -r https://jazzserver/ccm -u <user> <workspace name>
it works fine for me. I'm asked for the password and the load occurs.

0 votes

Comments

Yes, then it works. But I want to user more load commands in my script and I want to avoid entering my password every time. Also for performance issues I want to use the lscm.bat, not the scm.exe


Permanent link

OK, i have found one of my problems. The scm tool is case sensitive (even if in the server settings the "case sensitive" option is disabled). So in the jazz database my user name is WASSERMANN. So for the first login he accepts my user name in lower case. But when the scm tool wants my password again for the load command, it differs between wassermann and WASSERMANN. Because jazz doesn't allow two different connections to the same jazz server, he refuse the second one.

But I want still to avoid that I must enter the password for every command. Is there a way the lscm tool only user the connection I have created with the login command?

0 votes

Comments

Yes, as Tim mentioned you can use the following to cache the password...
lscm login -r repoUri -u username -n uriNickName -c (will prompt for password and cache the password)
or
lscm login -r repoUri -u username -P password -n uriNickName

Once the password is cached for the user, you can run commands without having to enter the password. To remove the cached entry, you need to run the logout command.

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
× 12,019
× 1,202
× 158

Question asked: Jan 17 '13, 7:16 a.m.

Question was seen: 6,473 times

Last updated: Jan 18 '13, 1:42 a.m.

Confirmation Cancel Confirm