From 522c8ce218f83e0ade29e0240486476a5188e77c Mon Sep 17 00:00:00 2001 From: Cyril Date: Thu, 25 Feb 2016 00:03:41 +0100 Subject: [PATCH] git-credential-read-only should match against username --- book/07-git-tools/git-credential-read-only | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/07-git-tools/git-credential-read-only b/book/07-git-tools/git-credential-read-only index ec8f4d1f4..b98833c4e 100755 --- a/book/07-git-tools/git-credential-read-only +++ b/book/07-git-tools/git-credential-read-only @@ -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}"