Bugfix: Restrict repo credential lookup to known keys.

The last test in that set is a regression test discovered while working
on #949.
Merge pull request #1074 from timmc/master

Bugfix: Restrict repo credential lookup to known keys.