CPAN-Uploader icon indicating copy to clipboard operation
CPAN-Uploader copied to clipboard

Support for ~/.netrc files in CPAN::Uploader?

Open cpanxaoc opened this issue 9 years ago • 2 comments

Is there any interest (or objections) in having CPAN::Uploader read PAUSE credentials from ~/.netrc (as opposed to ~/.pause)? If there's interest, I'd be happy to come up with a patch/PR for it.

If there is interest, would there be any objections to adding a dependency to Net::Netrc or a similar library, or should C::U do ~/.netrc parsing itself?

cpanxaoc avatar Aug 27 '15 16:08 cpanxaoc

I don't really know anything about netrc. What are the benefits?

rjbs avatar Oct 06 '15 01:10 rjbs

The two files (~/.pause and ~/.netrc) are essentially performing the same functions, storing login credentials for a remote host. However, there's no provision for encrypting credentials in ~/.netrc files.

If you're on Linux, most distros have a dedicated manpage, netrc(5), on OS X, it's part of the ftp(1) manpage. I'm already using netrc for the Dist::Zilla::Plugin::UploadToSFTP plugin to SFTP releases to SourceForge, and Git will also use it for push/pull HTTPS repos, if you ask it nicely, which is nice if you have more than one GitHub account. cURL also supports .netrc files via the --netrc switch.

I actually asked about this in #dzil, and the consensus there was that people would prefer some kind of encrypted credential store over using .netrc, so there's that.

cpanxaoc avatar Oct 15 '15 19:10 cpanxaoc