diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-03 16:56:41 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-03 16:56:41 +0400 |
commit | 2985697af788c33b3d5b4731ec60e9b5055f97b5 (patch) | |
tree | 6ef470666e587920252385be138cc24b9eec0ca8 /lib | |
parent | 9e80d2d4f79edf81185461a34a50adcd251073f1 (diff) |
Real fix for removing keys. Closes PR #1616
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/backend/gitolite_config.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/backend/gitolite_config.rb b/lib/gitlab/backend/gitolite_config.rb index ed366f61a79..fcf43fa214d 100644 --- a/lib/gitlab/backend/gitolite_config.rb +++ b/lib/gitlab/backend/gitolite_config.rb @@ -96,8 +96,9 @@ module Gitlab end def rm_key(user) - File.unlink(File.join(config_tmp_dir, 'gitolite/keydir',"#{user}.pub")) - `cd #{File.join(config_tmp_dir,'gitolite')} ; git rm keydir/#{user}.pub` + key_path = File.join(config_tmp_dir, 'gitolite/keydir', "#{user}.pub") + ga_key = ::Gitolite::SSHKey.from_file(key_path) + ga_repo.rm_key(ga_key) end # update or create |