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

Add support for reading credentials from ~/.netrc #260

Open
biochimia opened this issue Apr 24, 2017 · 1 comment
Open

Add support for reading credentials from ~/.netrc #260

biochimia opened this issue Apr 24, 2017 · 1 comment

Comments

@biochimia
Copy link

Various applications are able to read credentials from ~/.netrc files, and there's a library offering support for reading and writing these files from ruby: https://github.com/heroku/netrc.

It would be good to consolidate credentials for the gist tool into that file and depend on a library built for managing credentials.

Thoughts?

biochimia added a commit to biochimia/gist that referenced this issue Apr 25, 2017
Git, curl, and other tools already offer support for loading credentials
from ~/.netrc, namely when interacting with GitHub. This uses the netrc
gem to play along. This is implemented as a fallback, in case a token is
not found in the gist-specific file.

Fixes defunkt#260.
biochimia added a commit to biochimia/gist that referenced this issue Apr 26, 2017
Git, curl, and other tools already offer support for loading credentials
from ~/.netrc, namely when interacting with GitHub. This uses the netrc
gem to play along. This is implemented as a fallback, in case a token is
not found in the gist-specific file.

To avoid adding gem dependencies, the netrc library is imported from
https://github.com/heroku/netrc into the vendor folder. It is licensed
under the MIT license, the same as this project.

The standalone script build/gist was regenerated and pulls in missing
changes in addition to the netrc dependency.

Fixes defunkt#260.
biochimia added a commit to biochimia/gist that referenced this issue Apr 29, 2017
Git, curl, and other tools already offer support for loading credentials
from ~/.netrc, namely when interacting with GitHub. This uses the netrc
gem to play along. It's implemented as a fallback, in case a token is
not found in the gist-specific file.

To avoid adding gem dependencies, the netrc library is imported from
https://github.com/heroku/netrc into the vendor folder. It is licensed
under the MIT license, the same as this project, and it's copyright
notice and license have been embedded in a comment with the code.

The standalone script build/gist was regenerated and pulls in missing
changes in addition to the netrc dependency.

Fixes defunkt#260.
@biochimia
Copy link
Author

netrc support was reverted in c12fe61 due to #263. There's some discussion of the issues that cropped up with #261 in that issue.

Shall we reopen this issue?

@ConradIrwin ConradIrwin reopened this May 18, 2017
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

2 participants