Add :netrc
library to your project's dependencies in mix.exs
:
defp deps do
[
{:netrc, "~> 0.0.1"}
]
end
And fetch:
$ mix deps.get
Read the user's default netrc file:
iex> Netrc.read
%{"api.github.com" => %{"login" => "username", "password" => "pass"}}
Read the specific file path:
iex> Netrc.read("test/data/sample.netrc")
%{"m" => %{"login" => "l", "password" => "p"}}
Copyright © 2014-2015 Takayuki Matsubara, released under the MIT license.