Skip to main content

Persistent environment variables for Linux

Setting system variables as persistent environment variables is a one-time task. Review the following variables to set:

  • DigiCert ONE host

  • API key

  • Client authentication certificate path and password

Set persistent environment variables

  1. Launch the Terminal application.

  2. Open the file in an editor:

    nano ~/.profile
  3. Add any exports definitions you need:

    export SM_API_KEY= <API key>
    export SM_HOST=<host URL>
    export SM_CLIENT_CERT_FILE=<P12 client authentication certificate file path>
    export SM_CLIENT_CERT_PASSWORD=<P12 client authentication certificate password>
  4. Select CTRL+X to exit.

  5. Select Y to save.

  6. Select Enter to keep the same file name.

  7. Run the new .profile by restarting Terminal or using:

     source ~/.profile

Remove persistent variables

When your API key and client certificate password are securely stored in the properties file or Linux Pass, remove them from persistent variables. This action prevents unauthorized access and keeps your credentials secure.

  1. Launch the Terminal application.

  2. Open the file in an editor:

    nano ~/.profile
  3. Remove the following from the .profile:

    export SM_API_KEY= <API key>
    export SM_CLIENT_CERT_PASSWORD=<P12 client authentication certificate password>
  4. Select CTRL+X to exit.

  5. Select Y to save.

  6. Select Enter to keep the same file name.

  7. Run the new .profile by restarting Terminal or using the following command:

     source ~/.profile

Proxy configuration

Configure the HTTPS_PROXY environment variable if the client tool need to communicate through a proxy.

Anonymous proxy

If your proxy doesn't require authentication, run the following command:

export HTTPS_PROXY=https://<proxy_host>:<proxy_port>

Authenticated proxy

If your proxy requires authentication, run the following command:

export HTTPS_PROXY=https://user:password@<proxy_host>:<proxy_port>