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
Accepted answer
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.
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.
1 vote
2 other answers
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.
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?
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.