Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-18 18:14:36 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-18 18:14:36 +0300
commitf7bf892cca6bb8106194c14bef1ed9ddfc26ec91 (patch)
treeb9f47db5ffcb682281a52f281069e2bd8a852bad /config
parentcfee95d0327485dffb8ea4d698d3f7f310fc6c19 (diff)
Revert "gitlab shell works if multiple rubies installed"
This reverts commit 533f4cdf30b38c587f7a91f0dfd898b907ecd944.
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/gitlab.yml.example2
-rw-r--r--config/initializers/gitlab_shell_secret_token.rb20
3 files changed, 20 insertions, 4 deletions
diff --git a/config/application.rb b/config/application.rb
index 8300cf57a61..44a5d68d126 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -92,7 +92,5 @@ module Gitlab
redis_config_hash[:namespace] = 'cache:gitlab'
config.cache_store = :redis_store, redis_config_hash
-
- ENV['GITLAB_PATH_OUTSIDE_HOOK'] = ENV['PATH']
end
end
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 14b5e134ce2..bb0ffae0b70 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -307,7 +307,7 @@ test:
enabled: true
gitlab:
host: localhost
- port: 3001
+ port: 80
# When you run tests we clone and setup gitlab-shell
# In order to setup it correctly you need to specify
diff --git a/config/initializers/gitlab_shell_secret_token.rb b/config/initializers/gitlab_shell_secret_token.rb
index 250b86caaf0..8d2b771e535 100644
--- a/config/initializers/gitlab_shell_secret_token.rb
+++ b/config/initializers/gitlab_shell_secret_token.rb
@@ -1 +1,19 @@
-Gitlab::Shell.setup_secret_token
+# Be sure to restart your server when you modify this file.
+
+require 'securerandom'
+
+# Your secret key for verifying the gitlab_shell.
+
+
+secret_file = Rails.root.join('.gitlab_shell_secret')
+gitlab_shell_symlink = File.join(Gitlab.config.gitlab_shell.path, '.gitlab_shell_secret')
+
+unless File.exist? secret_file
+ # Generate a new token of 16 random hexadecimal characters and store it in secret_file.
+ token = SecureRandom.hex(16)
+ File.write(secret_file, token)
+end
+
+if File.exist?(Gitlab.config.gitlab_shell.path) && !File.exist?(gitlab_shell_symlink)
+ FileUtils.symlink(secret_file, gitlab_shell_symlink)
+end \ No newline at end of file