-
Notifications
You must be signed in to change notification settings - Fork 47
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
Don't store authentication token in ~/.config #191
Conversation
It's really something to consider, thanks @mneorr. I guess storing the credentials in a keychain would be the optimal solution. We can abstract that logic into specific sources by GOARCH, we can have We're trying to be totally compatible with hub, which might require some kind of transformation from its configuration file to something like this. |
@calavera I really like the idea of using native mechanism for storing credentials! And it's good use of Go build tag for this purpose 👍. @mneorr You could specify the path to the config file by using the |
@jingweno i'm sad seeing this being closed, because documenting isn't a solution. |
@mneorr I didn't close it. I merged the branch and github did that... |
Looks like with the new UI, i can't reopen an issue either... |
it's because you turned the issue into a PR. PRs cannot be reopen. |
We should definitely keep this open until we provide something else as a solution. |
There's apparently something we could do to minimize misoperation like this: #193 |
@mneorr We're accepting suggestions for better places to store the OAuth token in a cross platform way; OS X Keychain is cool but we unfortunately don't have it on Linux or Windows. Credentials via environment variables is theoretically a good solution but in practice it's a nightmare to configure environment variables consistently for different kinds of execution contexts. |
@mislav you can at least store it in There are projects like GPG that could probably work on other platforms. |
Seems like the lowest common denominator is looking to environment variables:
I don't love the idea that by default the tool writes sensitive information directly into a plain text file, even though the location can be configured. |
Please don't make the same mistake as
hub
does.~/.config
folder is used byfish
,cocoapods
and many other tools.It's a folder intended to store configuration files.
That means people are checking it in with their
dotfiles
repos.Use the OS-level keychains, or require an ENV.