$ gh config set git_protocol https -h github.com
$ gh auth status --show-token # <== copy your authentication token
$ git credential reject <<<"url=https://github.com"
$ git credential approve <<<"url=https://USER:[email protected]"
source: cli/cli#1326