Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Use git credential fill to securely store token #778

Open
cspotcode opened this issue Aug 3, 2020 · 0 comments
Open

Use git credential fill to securely store token #778

cspotcode opened this issue Aug 3, 2020 · 0 comments

Comments

@cspotcode
Copy link

Is your feature request related to a problem? Please describe.

I use a git access token stored in git's credential store for both git commands (pull, push) and for CLI scripts which talk to the github API. My scripts can extract the creds via git credential fill, and it's stored in my OS's keychain instead of plain text.

Describe the solution you'd like

some sort of configuration for gh so it can pull my access token from git credential fill

Describe alternatives you've considered

Additional context

This is how git credential fill works. Pipe a request in, it takes care of interactively prompting the user as needed, delegating to the OS-native credential helper. Then it writes a response to stdout.

echo 'url=https://github.com' | git credential fill

If node-gh wants to avoid conflicting with already-stored credentials, you could use a different form of URL. Or make this behavior an opt-in config flag so it doesn't affect everyone.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant