Search notes:

cmdkey.exe

Access the credential manager from the command line (i. e. cmd.exe`, PowerShell etc.) to create, display an delete stored user names and passwords.

Show credentials

C:\> cmdkey /list

Error message: The parameter is incorrect.

C:\> cmdkey '/add:git:https://github.com' '/user:ReneNyffenegger' '/pass:XXXXX

CMDKEY: The parameter is incorrect.
Use /generic: rather than /add:
C:> cmdkey /generic:git:https://github.com /user:ReneNyffenegger /pass:XXXX

CMDKEY: Credential added successfully.

Adding a github access token

A github access token can be added (in PowerShell) like so:
$githubToken='ghp_…'
cmdkey /generic:LegacyGeneric:target=git:https://github.com /user:ReneNyffenegger /pass:$githubToken
This entry can later be be deleted:
cmdkey /delete:LegacyGeneric:target=git:https://github.com

See also

The GUI version of the credential manager can be started from the command line with
control /name Microsoft.CredentialManager

Index