if an entry has only a username, password is chosen from the next entry #14

Open
rkh opened this Issue Jan 11, 2013 · 2 comments

Projects

None yet

2 participants

@rkh
rkh commented Jan 11, 2013

My .netrc looks something like this:

machine github.com
  login GITHUB_TOKEN
machine api.heroku.com
  login HEROKU_LOGIN
  password HEROKU_TOKEN
... more entries ...

Now, when I try to find the github token, I get this:

require 'netrc'

Netrc.read["github.com"] # => ["GITHUB_TOKEN", "HEROKU_TOKEN"]
Owner
geemus commented Jan 11, 2013

@rkh - I think (unfortunately) that this is a known issue. If I remember right you can workaround by adding a (presumably blank) password line for the time being, I think making it do the right thing would take a somewhat more significant amount of work at present, happy to answer questions but I suspect I won't have time to address this myself in the near term.

rkh commented Jan 12, 2013

Fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment