Search code examples
githubgithub-cli

What is -h in "gh config set -h github.com git_protocol ssh"?


This is a command to set the authentication protocol on Github. I'm curious about what the flag means.


Solution

  • From the API docs for gh config set: https://cli.github.com/manual/gh_config_set

    Options

    -h, --host string   Set per-host setting
    

    It means that key-value setting will only be applied on that particular host (ex. "github.com").