Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow command to be run to save/load personal access token. #2049

Closed
idcmp opened this issue Feb 19, 2019 · 1 comment
Closed

Allow command to be run to save/load personal access token. #2049

idcmp opened this issue Feb 19, 2019 · 1 comment

Comments

@idcmp
Copy link

idcmp commented Feb 19, 2019

As a SSO user of GHE, I use my SSO workflow to authenticate to GHE's website, and I have an SSH key which I use for doing normal Git operations. My SSH is protected through various mechanisms.

In order to make use of hub I need to create a personal access token and store it on my local machine.

I would like to be able to store this token in a mechanism that I prefer, and then fetch it when needed.

You can imagine:

$ hub action-that-requires-credentials --oauth-token-cli=/usr/local/bin/hub-oauth-token-cli
Your name: idcmp
Password: ...

$ cat ~/.config/hub
github.example.com:
- user: idcmp
  oauth_token_cli: /usr/local/bin/hub-oauth-token-cli
  protocol: https

Possibly the usage would be:

$ /usr/local/bin/hub-oauth-token-cli save github.example.com idcmp ab0cad0e0f0a234
$ /usr/local/bin/hub-oauth-token-cli load github.example.com idcmp
ab0cad0e0f0a234
@mislav
Copy link
Owner

mislav commented Feb 20, 2019

That's a good idea! Maybe we could even re-use git's credential helper by default.

However, this isn't the first time features related to this were suggested, so I'm going to close this in favor of #1912 #1217 #889 #225. Thank you for writing in!

@mislav mislav closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@mislav @idcmp and others