Commit 2985697a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Real fix for removing keys. Closes PR #1616

parent 9e80d2d4
...@@ -96,8 +96,9 @@ module Gitlab ...@@ -96,8 +96,9 @@ module Gitlab
end end
def rm_key(user) def rm_key(user)
File.unlink(File.join(config_tmp_dir, 'gitolite/keydir',"#{user}.pub")) key_path = File.join(config_tmp_dir, 'gitolite/keydir', "#{user}.pub")
`cd #{File.join(config_tmp_dir,'gitolite')} ; git rm keydir/#{user}.pub` ga_key = ::Gitolite::SSHKey.from_file(key_path)
ga_repo.rm_key(ga_key)
end end
# update or create # update or create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment