Commit 2985697af788c33b3d5b4731ec60e9b5055f97b5

Authored by Dmitriy Zaporozhets
1 parent 9e80d2d4

Real fix for removing keys. Closes PR #1616

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
lib/gitlab/backend/gitolite_config.rb
... ... @@ -96,8 +96,9 @@ module Gitlab
96 96 end
97 97  
98 98 def rm_key(user)
99   - File.unlink(File.join(config_tmp_dir, 'gitolite/keydir',"#{user}.pub"))
100   - `cd #{File.join(config_tmp_dir,'gitolite')} ; git rm keydir/#{user}.pub`
  99 + key_path = File.join(config_tmp_dir, 'gitolite/keydir', "#{user}.pub")
  100 + ga_key = ::Gitolite::SSHKey.from_file(key_path)
  101 + ga_repo.rm_key(ga_key)
101 102 end
102 103  
103 104 # update or create
... ...