Connect: connect

Use connect to connect to the StarTeam Server. The connection persists until you use the disconnect command. Because the connection persists, you can specify all subsequent commands without using the -p option to connect with each command. However, to switch between projects, views, and working folders, use set project...[viewHierarchy ] [folderHierarchy ] while in the same session.

Note: This command is part of the stateful model and only works with stcmd, not stcmdEx.

Before attempting to connect to the same session, you must disconnect. Use the disconnect command to disconnect from the session.

Syntax

The syntax for this command is as follows:

stcmd connect [username[:password]@]address:port 
[passwordFromFile passwordFile] [storePasswordToFile passwordFile] 
[caseSensitiveFolders | -csf] [encryption = RC4|RC2_ECB|RC2_CBC_RC2_FCB]
[compression | -cmp] [mpx=on|off (default ON) [profile=eventHandlerProfilename] 
[cacheAgent@address:port (default autoLocate] | =off]
[[cacheAgentThreads=noOfThreads][-mode [lock | exlock | unlock]] 
[separator=fieldSeparator] [headers = on|off]
Parameter
Description
passwordFromFile
Location of file containing password.
storePasswordToFile
Location to store the password file.
-csf

When the command maps the folder specified in the -p option to the underlying StarTeam folder, using -csf causes the command to differentiate StarTeam folders based on the case-sensitive spelling of their names This option does not apply to the case-sensitivity of filenames in the folders. For example, with -csf, StarTeam folders named doc and Doc are recognized as different folders. Without this option, either folder could be recognized as the doc folder.

The default is that StarTeam folders are not differentiated based on the case of letters in their names.

With or without -csf, if folder names are ambiguous, an error occurs. For example, when you use -csf, the names of two folders are ambiguous if both a Doc and doc folder exist. When you do not use -csf, folder names are ambiguous if they are spelled identically.

-encrypt

Encrypts all data sent between the workstation and the server and decrypts it when it arrives. Without this option, no encryption takes place. Encryption protects files, data and other project information from being read by unauthorized parties over unsecured networks.

This is an optional parameter. If not specified, then the server and the command line negotiate the encryption required by the server.

The full syntax is: -encrypt encryptionType.

The types of encryption are:

RC4
RSA RC4 stream cipher (fast).
RC2_ECB
RSA RC2 block cipher (Electronic Codebook).
RC2_CBC
RSA RC2 block cipher (Cipher Block Chaining).

These encryption types are ordered from fastest to slowest. Each of the slower encryption types is safer than the one preceding it.

Note: For platforms other than Microsoft Windows, the public and private keys used in the encryption process are not created automatically. They are stored in a file in the user’s home directory. This options file is named .starteam. It contains a variable or shell variable called keyfile. The keyfile variable specifies the location of the file that contains the public and private keys. If you do not specify the keyfile variable, an error occurs. When you specify the keyfile variable, but the file does not exist, the StarTeam Cross-Platform Client generates a random pair of keys, creates the file, and stores the keys in it. Be sure to secure this file. For example, in UNIX, only its owner should be able to read it.
-cmp

Compresses all the data sent between the workstation and the server and decompresses it when it arrives. Without this option, no compression takes place.

Compression speeds transmission across the network, but it takes time on the front end to compress the data and at the back end to decompress the data.

This is an optional parameter. If not specified, then the platform default is not to compress.

mpx
Turn MPX on or off. Default value is on.
profile
You can specify an MPX profile by eventhandler name, if your server offers you the ability to connect to more than one MPX server that allows you to choose between event handlers.
cacheAgent@address:port
Provides an address. host:port specifies the actual known address of the cache agent.
autoLocate
StarTeam automatically gets the cache agent.
cacheAgentThreads
The number of threads allocated to the cacheAgent.
-mode

Indicates whether the server is to be locked, exclusively locked, or unlocked.

-mode lock
Only server administration commands are accepted until the server is unlocked. For example, you might use this command while running a backup program.
-mode exlock
Only you can access the server until it is unlocked. For example, you might do this when creating a custom field.
-mode unlock
Use to make the server available to users again.
lock
Non-exclusively locks the StarTeam Server. Only administrative commands can be performed.
unlock
Unlocks the StarTeam Server so that anyone with the appropriate access rights can access it.
exlock
Exclusively locks the server so that no one else can access it.
headers
By default, headers = on. If headers = off, output files are written without headers.

Example

The following example uses connect to connect to the server using port 1024 on Orion and non-exclusively locks the server.

connect "JMarsh:password@Orion:1024" -mode lock