From 987b2fbf7addc3878c88c17d2fc8ea16fa1141b7 Mon Sep 17 00:00:00 2001 From: "N.A.Y" Date: Sun, 12 Feb 2012 01:13:50 +0700 Subject: [PATCH 1/3] Two bugs fixed. First bug: Git public key file has "\r\n" instead of "\n". (fixed) Second bug: Git public key doesn't remove from database when user is not a some project member. (fixed) --- app/controllers/gitolite_public_keys_controller.rb | 1 + lib/git_hosting.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/gitolite_public_keys_controller.rb b/app/controllers/gitolite_public_keys_controller.rb index e11721d2b..6734989e1 100644 --- a/app/controllers/gitolite_public_keys_controller.rb +++ b/app/controllers/gitolite_public_keys_controller.rb @@ -12,6 +12,7 @@ def edit def delete @gitolite_public_key[:active] = 0 @gitolite_public_key.save + @gitolite_public_key.destroy redirect_to url_for(:controller => 'my', :action => 'account') end diff --git a/lib/git_hosting.rb b/lib/git_hosting.rb index 8bcea3432..2f7b4b29e 100755 --- a/lib/git_hosting.rb +++ b/lib/git_hosting.rb @@ -412,7 +412,7 @@ def self.update_repositories(projects, is_repo_delete) users.map{|u| u.gitolite_public_keys.active}.flatten.compact.uniq.each do |key| filename = File.join(local_dir, 'gitolite-admin/keydir',"#{key.identifier}.pub") unless File.exists? filename - File.open(filename, 'w') {|f| f.write(key.key.gsub(/\n/,'')) } + File.open(filename, 'w') {|f| f.write(key.key.gsub(/\r\n/,"")) } changed = true end end From 8ab923a5dc6f29f13a67b3c41e58e38f323d67dc Mon Sep 17 00:00:00 2001 From: "N.A.Y" Date: Sun, 12 Feb 2012 01:27:20 +0700 Subject: [PATCH 2/3] Two bugs fixed. First bug: Git public key file has "\r\n" instead of "\n". (fixed) Second bug: Git public key doesn't remove from database when user is not a some project member. (fixed) --- lib/git_hosting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git_hosting.rb b/lib/git_hosting.rb index 2f7b4b29e..7833b249c 100755 --- a/lib/git_hosting.rb +++ b/lib/git_hosting.rb @@ -412,7 +412,7 @@ def self.update_repositories(projects, is_repo_delete) users.map{|u| u.gitolite_public_keys.active}.flatten.compact.uniq.each do |key| filename = File.join(local_dir, 'gitolite-admin/keydir',"#{key.identifier}.pub") unless File.exists? filename - File.open(filename, 'w') {|f| f.write(key.key.gsub(/\r\n/,"")) } + File.open(filename, 'w') {|f| f.write(key.key.gsub(/\r\n/,"\n")) } changed = true end end From d36dd8beedf5271fcfeb7af8f73c79cd3826a357 Mon Sep 17 00:00:00 2001 From: "N.A.Y" Date: Mon, 13 Feb 2012 21:11:43 +0700 Subject: [PATCH 3/3] README file has been updated. --- README.mkd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mkd b/README.mkd index 945b9cf82..d93614301 100755 --- a/README.mkd +++ b/README.mkd @@ -90,7 +90,7 @@ owner of these files to www-data and the permissions to 600 for the private key root directory: cd vendor/plugins - git clone https://github.com/ericpaulbishop/redmine_git_hosting.git + git clone https://Devoter@github.com/Devoter/redmine_git_hosting.git rm -rf redmine_git_hosting/.git cd ../..