git-credential-manager icon indicating copy to clipboard operation
git-credential-manager copied to clipboard

Improve discoverability of time-saving config options

Open hickford opened this issue 3 years ago • 1 comments

Config option credential.githubauthmodes can save the user time by remembering preferred authentication method, but this and similar config options are hard to discover without reading the docs.

A short message printed to terminal at the right moment could make relevant config options easier to discover, eg.

Select an authentication method for 'https://github.com/':
  1. Web browser (default)
  2. Device code
  3. Personal access token
option (enter for default): 1
info: always authenticate by web browser? git config --global credential.githubauthmodes browser
info: please complete authentication in your browser...

This would also help GUI users at the terminal, but not when git push is invoked via some other program without a terminal.

image

hickford avatar Apr 30 '22 23:04 hickford

This would also help GUI users at the terminal, but not when git push is invoked via some other program without a terminal.

To help those latter users we could possibly add a "remember my choice" or "always use this method" checkbox and plumb that in pretty easily, and actually update the --global config.

image

mjcheetham avatar May 04 '22 13:05 mjcheetham