Store credentials

We can store credentials for URLs that require authentication, such as repositories, proxy servers, and response files as you copy a package from the command line.

The -keyring and -password options that are used to store credentials to a key ring file are deprecated. Use the -secureStorageFile and -masterPasswordFile options to store credentials to a credential file. For more information, see Migrate from key ring files to storage files. To store credentials in a key ring file, see Store credentials in a key ring file.

Packing Utility uses the Eclipse infrastructure in Installation Manager to save credentials. When we use the -secureStorageFile and -masterPasswordFile options, we create a storage file that contains our credentials.

If we use an existing storage file, the new credentials are added and the previous credentials are not overwritten.

If we do not save our credentials, we are prompted to enter our credentials each time you access the repository.

For information about the command-line arguments, see Command-line arguments for the pucl command.

If we are storing credentials for a service repository, we must have an IBM user name and password. To register for an IBM user name and password, go to: http://www.ibm.com/account/profile. For information about service repositories, see Search service repositories.

Procedure

To use stored credentials when you copy a package:

  1. If we do not have a master password file, create the file. The master password file is a text file that contains a passphrase. An example of a passphrase is: This text is the master password.

    Tip: To secure this file, set permissions to restrict access to this file as appropriate for your operating system.

  2. From the command line, open the Installation Manager tools directory

  3. Run the command to save our credentials:

        imutilsc saveCredential
         -url address | -passportAdvantage	
         -userName user_name -userPassword password  -secureStorageFile storage_file -masterPasswordFile master_password_file 

      Operating system Command
      Windows imutilsc saveCredential -url http://myServer -userName myUserName -userPassword myPassword -secureStorageFile C:\credential.store -masterPasswordFile C:\master_password_file.txt
      Linux, UNIX, ZOS and OS X ./imutilsc saveCredential -url http://myServer -userName myUserName -userPassword myPassword -secureStorageFile /home/credential.store -masterPasswordFile /home/user/master_password_file.txt

      If we use the IBM service repositories, specify the http://www.ibm.com/software/repositorymanager/com.ibm.cic.packagingUtility value for the -url option. This value is the Packaging Utility service repository.

    • From a command-line utility, open the Packaging Utility directory.

      Operating system Administrator Nonadministrator Group
      Windows C:\Program Files [(x86)]\IBM\PackagingUtility C:\Users\user\IBM\PackagingUtility Not available
      UNIX /opt/IBM/PackagingUtility /opt/IBM/PackagingUtility /opt/IBM/PackagingUtility_Group
      OS X /Applications/IBM/Packaging Utility /Users/users/IBM/Packaging Utility /Users/users/IBM/Packaging Utility_Group

    • To copy packages from repositories:

        pucl copy package_ID -prompt 
        	-repositories source_repository
        	-target destination_repository 
        	-secureStorageFile storage_file -masterPasswordFile master_password_file	
         	-acceptLicense 	

      Enclose file paths that include spaces with double quotation marks.


Results

The package that you specified is copied to the specified location.


Store credentials in a key ring file

For versions 1.6.1 and earlier, use the -keyring and -password options to save credentials.

If we do not want share your key ring with other users, we must create a key ring that only we can access. Multiple users can use the same instance of Packaging Utility that is installed in either group mode or in administrator mode. Some repositories might require credentials. If the default key ring location is used and we did not use the-password option when we created the key ring, other users can use our credentials to access the repository. Create a key ring using the -keyring and -password options with pucl.

If we do not save our credentials, we are prompted to enter our credentials each time you access the repository.

For information about the command-line arguments, see Command-line arguments for the pucl command. For more information about key ring files, see the Eclipse workbench user guide.

Procedure

To store credentials in a key ring file as you copy a package:

  1. From a command-line utility, open the Packaging Utility directory.

    Operating system Administrator Nonadministrator Group
    Windows C:\Program Files [(x86)]\IBM\PackagingUtility C:\Users\user\IBM\PackagingUtility Not available
    UNIX /opt/IBM/PackagingUtility /opt/IBM/PackagingUtility /opt/IBM/PackagingUtility_Group
    OS X /Applications/IBM/Packaging Utility /Users/users/IBM/Packaging Utility /Users/users/IBM/Packaging Utility_Group

  2. Run this command:

        pucl copy package_ID -prompt 
        	-repositories source_repository 
        	-target destination_repository	
        	-keyring keyring_file [ -password passowrd ]	
        	-acceptLicense

      Enclose file paths that include spaces with double quotation marks.


Results

  1. Your credentials are saved in the key ring file in the location that you specified with the -keyring keyring_file option.
  2. The package that you specified is copied to the specified location.


What to do next

After we create a key ring file, we can use the -keyring keyring_file -password password options with the copy command to authenticate with a protected repository. If the credentials are saved to the key ring file, you do not have to use the -prompt option in your command.
Home