When you want to install your own version of gitorious, a lot of people seem to run into issues where they don’t have a real DNS name for their servers. This breaks the session code of gitorious.
I just ran a ‘git diff’ on my gitorious tree, and here are the changes I made to make it work:
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index 7384f93..2409810 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -8,7 +8,8 @@ gitorious_yaml = YAML::load_file(File.join(Rails.root, "config/gitorious.yml"))[
ActionController::Base.session = {
:key => '_gitorious_sess',
:secret => gitorious_yaml['cookie_secret'],
- :domain => ".#{gitorious_yaml["gitorious_host"]}",
+# :domain => ".#{gitorious_yaml["gitorious_host"]}",
+ :domain => "10.80.21.73",
:expire_after => 3.weeks,
}
And also:
diff --git a/app/models/repository.rb b/app/models/repository.rb
index c4fd612..1df689c 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -226,7 +226,7 @@ class Repository < ActiveRecord::Base
end
def http_clone_url
- "http://git.#{GitoriousConfig['gitorious_host']}/#{gitdir}"
+ "http://#{GitoriousConfig['gitorious_host']}/#{gitdir}"
end
def http_cloning?
If you change 10.80.21.73 to whatever your ip is, all of your troubles should go away.