diff --git a/changelog/support-for-.netrc-file-added.dd b/changelog/support-for-.netrc-file-added.dd new file mode 100644 index 0000000..9d84ff9 --- /dev/null +++ b/changelog/support-for-.netrc-file-added.dd @@ -0,0 +1,5 @@ +Support for .netrc file added + +Basic authentication credentials defined in .netrc file +will now be taken into account while connecting to secured +repositories. \ No newline at end of file diff --git a/source/dub/internal/utils.d b/source/dub/internal/utils.d index 9814e2f..30f637e 100644 --- a/source/dub/internal/utils.d +++ b/source/dub/internal/utils.d @@ -474,6 +474,9 @@ } conn.addRequestHeader("User-Agent", "dub/"~getDUBVersion()~" (std.net.curl; +https://github.com/rejectedsoftware/dub)"); + + enum CURL_NETRC_OPTIONAL = 1; + conn.handle.set(CurlOption.netrc, CURL_NETRC_OPTIONAL); } }