Forrest logo
back to the gh tool

gh-config:tldr:5aff2

gh-config: Display what Git protocol is being used.
$ gh config get git_protocol
try on your machine

The command "gh config get git_protocol" is used to retrieve the current value of the "git_protocol" configuration property from the GitHub CLI (Command Line Interface).

The "git_protocol" configuration property determines the protocol used for Git operations performed by the GitHub CLI. It can have one of the following three values:

  1. "ssh": This value indicates that the SSH protocol should be used for Git operations. This means that Git will use SSH URLs when interacting with remote repositories.

  2. "https": This value indicates that the HTTPS protocol should be used for Git operations. Git will use HTTPS URLs for interacting with remote repositories.

  3. "auto": This value indicates that the protocol should be automatically determined based on the context. The GitHub CLI will use SSH for operations with private repositories and HTTPS for operations with public repositories.

By running the "gh config get git_protocol" command, you can see the current value of the "git_protocol" property in your GitHub CLI configuration.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gh tool