isomorphic-git/isomorphic-git

credentialManager API should also provide `fill` with `username` if stored in `.git/config`

Chiusa

#800 aperta il 13 ago 2019

 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (351 fork)batch import
choregood first issue

Metriche repository

Star
 (7054 stelle)
Metriche merge PR
 (Merge medio 13g 13h) (7 PR mergiate in 30 g)

Descrizione

Support for multiple credential contexts:

[credential "https://example.com"]
	username = foo

This boils down to: Code calling credentialManager.fill should look up credential.${url}.username from the config and provide that value as a username parameter.

This allows a global credentialManager plugin to store multiple account credentials for the same host (e.g. multiple GitHub accounts) and yet provide the correct details on a per-repo basis because repos can specify which username to use.

Guida contributor