sigma / gh.el

GitHub API library for Emacs
274 stars 74 forks source link

prefer global config for credentials #90

Closed dmh43 closed 7 years ago

dmh43 commented 7 years ago

I was very confused for a while when I updated my global git config, but gh-auth still used the old token :)

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 24.933% when pulling 7030a87b3f07fa371f4534f0a06f51f26a314c20 on dmh43:master into 6a76836a2ed1ebc3380dcfbe2b46786abf905fab on sigma:master.

sigma commented 7 years ago

yeah, I don't know. I mean, obviously I understand that this is confusing but on the other hand I really don't want to impose the cost of running a git process every single time we need to access that value. What's the use case here? are you trying to recover from a failed authentication? cause in this case I'd much rather have code that purges the auth cache in response to 403 errors

dmh43 commented 7 years ago

The use case is: when I expire a oauth token, or change my password on github, and then update the information in my gitconfig. As you mentioned, it's unexpected that the a password previously entered would continue to be used.

I like the idea of expiring the cache based on the response from github. I'll rework to incorporate that.