Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 1.11 KB

github-cli-install-and-auth.md

File metadata and controls

20 lines (13 loc) · 1.11 KB
  1. Install {% data variables.product.prodname_cli %} on macOS, Windows, or Linux. For more information, see Installation in the {% data variables.product.prodname_cli %} repository.

  2. Authenticate with {% data variables.product.company_short %} by running this command from your terminal.{% ifversion ghes %} Replace HOSTNAME with the name of {% data variables.location.product_location %}. For example, octo-inc.ghe.com.{% endif %}

    {%- ifversion fpt or ghec %}

    gh auth login

    {%- else %}

    gh auth login --hostname HOSTNAME

    {%- endif %}

  3. Follow the on-screen prompts.

    {% data variables.product.prodname_cli %} automatically stores your Git credentials for you when you choose HTTPS as your preferred protocol for Git operations and answer "yes" to the prompt asking if you would like to authenticate to Git with your {% data variables.product.prodname_dotcom %} credentials. This can be useful as it allows you to use Git commands like git push and git pull without needing to set up a separate credential manager or use SSH.