Skip to content

Commit

Permalink
Merge pull request progit#542 from jouve/cred_ro_helper
Browse files Browse the repository at this point in the history
git-credential-read-only should match against username
  • Loading branch information
ben committed Feb 25, 2016
2 parents c839655 + 522c8ce commit d4d130b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/07-git-tools/git-credential-read-only
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ end

File.readlines(path).each do |fileline| # <4>
prot,user,pass,host = fileline.scan(/^(.*?):\/\/(.*?):(.*?)@(.*)$/).first
if prot == known['protocol'] and host == known['host'] then
if prot == known['protocol'] and host == known['host'] and user == known['username'] then
puts "protocol=#{prot}"
puts "host=#{host}"
puts "username=#{user}"
Expand Down

0 comments on commit d4d130b

Please sign in to comment.