diff options
author | Bhagavan Das <bhagavan.das@baml.com> | 2013-02-15 03:10:18 +0400 |
---|---|---|
committer | Bhagavan Das <bhagavan.das@baml.com> | 2013-02-15 03:10:18 +0400 |
commit | 4bc7d98d65a84d037d6d8ddc807cdf0ceeb5a456 (patch) | |
tree | 56592918b6c1af1a395ed10377a35b00c299a82a /lib/tasks/gitlab/shell.rake | |
parent | 08dfbc962b9263662a188cbd71ebf39e6223e721 (diff) |
Remove hardcoded refernce to gitlab-shell home. so that gitlab can be installed on any unix account other than git
Diffstat (limited to 'lib/tasks/gitlab/shell.rake')
-rw-r--r-- | lib/tasks/gitlab/shell.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake index 0ab8df1d094..ec5451dd47c 100644 --- a/lib/tasks/gitlab/shell.rake +++ b/lib/tasks/gitlab/shell.rake @@ -25,12 +25,13 @@ namespace :gitlab do def setup warn_user_is_not_gitlab + gitlab_shell_authorized_keys = File.join(File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}"),'.ssh/authorized_keys') puts "This will rebuild an authorized_keys file." - puts "You will lose any data stored in /home/git/.ssh/authorized_keys." + puts "You will lose any data stored in #{gitlab_shell_authorized_keys}." ask_to_continue puts "" - system("echo '# Managed by gitlab-shell' > /home/git/.ssh/authorized_keys") + system("echo '# Managed by gitlab-shell' > #{gitlab_shell_authorized_keys}") Key.find_each(batch_size: 1000) do |key| if Gitlab::Shell.new.add_key(key.shell_id, key.key) |