Export (0) Print
Expand All

Set Environment Variables (Team Explorer Everywhere)

You can configure the Cross-platform Command-Line Client for Team Foundation Server by using the following environment variables:

  1. TF_AUTO_SAVE_CREDENTIALS

  2. http_proxy or HTTP_PROXY

  3. TF_DIFF_COMMAND

  4. TF_MERGE_COMMAND,

  5. TFSPROXY

  6. TF_ACCEPT_UNTRUSTED_CERTIFICATES.

For example, you can automatically save credentials to the workspace cache if you set the TF_AUTO_SAVE_CREDENTIALS environment variable to any value and then run a tf command with the –login option. For more information, see Command-Line Authentication for Team Explorer Everywhere. In this topic, you will learn how to set an environment variable persistently between consoles or terminal sessions on UNIX.

NoteNote

Your operating system maintains a set of dynamic values, which are named environment variables, to provide configuration and status information. You can set an environment variable temporarily for a single shell or command prompt. You can also set the variable to persist so that it affects all future shells or command prompts. This topic focuses only on how to set persistent environment variables on UNIX, where the variables and their values are stored in shell initialization scripts in the user's root directory.

The following examples demonstrate how to add an environment variable that is named “NAME” on UNIX by editing different files. You can substitute “NAME” and “value” with a specific name and value for the environment variable.

  • sh: Open the file ~/.profile in a text editor, and add two lines of text at the end of the file, as the following example shows:

    NAME=”value”

    export NAME

    Save and close the file.

  • bash/zsh/ksh: Open the file ~/.bashrc (bash), ~/.zshrc (zsh), or ~/.profile (ksh) in a text editor, and add a line of text at the end of the file, as the following example shows:

    export NAME=”value”

    Save and close the file.

  • csh/tcsh: Open the file ~/.cshrc (csh) or ~/.tcshrc (tcsh) in a text editor, and add a line of text at the end of the file, as the following example shows:

    setenv NAME “value”

    Save and close the file.

All new shells for your UNIX user will have the environment variable that is named “NAME”. If you do not want it to affect future programs, remove the text from the initialization file that you edited, log out from a shell, and then log back in. The “NAME” environment variable will no longer exist.

Community Additions

ADD
Show:
© 2014 Microsoft