Hi All,
I just finished installing the awesome Gitorious on RHEL 5.6 using
instructions from Philips
(http://famousphil.com/blog/2011/06/installing-gitorious-on-centos-5-6-x64/).
Thanks Philips so much!
I did have to modify a few files so that anywhere rake or ruby was being
called from a script, I had to prepend to them "bundle exec", so that the
correct version was used.
Here is how I have my *httpd.conf *setup:
*NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.mydomain.edu
DocumentRoot /var/www
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName git.mydomain.edu
DocumentRoot /home/git/gitorious/public
ErrorLog /var/www/errorgit.log
CustomLog /var/www/accessgit.log combined
#customlog is good for awstats software
<Directory /home/git/gitorious/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
#Load SSL
LoadModule ssl_module modules/mod_ssl.so
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
#SSL HTTPS Virtual Hosts
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
ServerName git.mydomain.edu
ServerAdmin [email protected]
DocumentRoot /home/git/gitorious/public
ErrorLog /var/www/errorgit.log
CustomLog /var/www/accessgit.log combined
<Directory /home/git/gitorious/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
*
So essentially my server setup is:
http://www.mydomain.edu/ --> redirect to /var/www
http://git.mydomain.edu/ --> gitorious
https://git.mydomain.edu/ --> gitorious SSL
*Contents of config/gitorious.yml*
*production:*
* cookie_secret:
DivWyosDawOanjevhafBetVickokyisWodnojQuevReubOfUfIrcyatvaiwivPakchynnyowUseyldellinbeQuegsUcugFedOidjasweccopFidIldamCodmapwanUmudphusUkCabcocmacFenonvivirrOvSasVinmacDalkorgOgnukdallElCigcak8VarOnneewgheodjen^asJudJojewfyaifporgUdbakotpeQuaujLincicfeofGueGuFruovdegoaHiweyWavWacbeHeid0flimwooblarGhoabungemrolilzimyeregKon3ObocOanoggArhegsEvTocNighopwatjuAjInHuhotvirUpFitvoypCoucWow
*
* repository_base_path: "/home/git/data/repositories"*
* extra_html_head_data:*
* system_message: "I am still testing this service. Use with caution,
backup your data! - Sidhant"*
* gitorious_client_port: 80*
* gitorious_client_host: git.mydomain.edu*
* gitorious_host: git.mydomain.edu*
* gitorious_user: git*
* exception_notification_emails: [email protected]*
* mangle_email_addresses: true*
* public_mode: true*
* locale: en*
* archive_cache_dir: "/home/git/data/tarballs"*
* archive_work_dir: "/home/git/data/tarball-work"*
* only_site_admins_can_create_projects: false*
* hide_http_clone_urls: false*
* is_gitorious_dot_org: false*
*Problem:*
When I browse to http://git.mydomain.edu/ , I successfully see the gitorious
website up and running. I can click various links and navigate. Problem is
when I click on Login, enter my username password, I get this:
URL: https://git.mydomain.edu/sessions
Error: "Sorry, something went wrong"
*
Output in /home/git/gitorious/log/production.log*
*ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):*
*
vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb:79:in
`verify_authenticity_token'*
* vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in `send'*
* vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in
`evaluate_method'*
* vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in `call'*
* vendor/rails/actionpack/lib/action_controller/filters.rb:225:in `call'*
* vendor/rails/actionpack/lib/action_controller/filters.rb:629:in
`run_before_filters'*
* vendor/rails/actionpack/lib/action_controller/filters.rb:615:in
`call_filters'*
* vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark'*
* vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'*
* vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
`ms'*
* /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/1.8/benchmark.rb:308:in
`realtime'*
* vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
`ms'*
* vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'*
* vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
`perform_action_without_flash'*
* vendor/rails/actionpack/lib/action_controller/flash.rb:146:in
`perform_action'*
* vendor/rails/actionpack/lib/action_controller/base.rb:532:in `send'*
* vendor/rails/actionpack/lib/action_controller/base.rb:532:in
`process_without_filters'*
* vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'
*
* vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'*
* vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'*
* vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in
`call'*
* vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in
`dispatch'*
* vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in
`_call'*
* vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in
`build_middleware_stack'*
* vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'*
* vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'*
*
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache'*
* vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'*
* vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'*
*
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
`call'*
* vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in
`call'*
* rack (1.0.1) lib/rack/head.rb:9:in `call'*
* rack (1.0.1) lib/rack/methodoverride.rb:24:in `call'*
* vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in
`call'*
* vendor/rails/railties/lib/rails/rack/metal.rb:47:in `call'*
*
vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in
`call'*
*
vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:24:in
`call'*
* vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'*
* rack (1.0.1) lib/rack/lock.rb:11:in `call'*
* rack (1.0.1) lib/rack/lock.rb:11:in `synchronize'*
* rack (1.0.1) lib/rack/lock.rb:11:in `call'*
* vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in `call'
*
* passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:96:in
`process_request'*
* passenger (3.0.7)
lib/phusion_passenger/abstract_request_handler.rb:513:in
`accept_and_process_next_request'*
* passenger (3.0.7)
lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'*
* passenger (3.0.7)
lib/phusion_passenger/classic_rails/application_spawner.rb:321:in
`start_request_handler'*
* passenger (3.0.7)
lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'*
* passenger (3.0.7)
lib/phusion_passenger/classic_rails/application_spawner.rb:275:in
`handle_spawn_application'*
* passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'*
* passenger (3.0.7)
lib/phusion_passenger/classic_rails/application_spawner.rb:270:in
`handle_spawn_application'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in `start'
*
* passenger (3.0.7)
lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'*
* passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in
`spawn_rails_application'*
* passenger (3.0.7)
lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'*
* passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in
`spawn_rails_application'*
* passenger (3.0.7)
lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'*
* passenger (3.0.7)
lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'*
* passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in
`spawn_rails_application'*
* passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in
`spawn_application'*
* passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in
`handle_spawn_application'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`__send__'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'*
* passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'*
* passenger (3.0.7) helper-scripts/passenger-spawn-server:99*
Now, from another post here, I figured this is because of the CSRF
protection and that there maybe some mismatch between gitorious_client_host
and/or gitorious_host and what the actual URL is from which the form is
being submitted. I have double checked and see no problem: vhost is
git.mydomain.edu, and so are the two gitorious_client_host and
gitorious_host.
To *verify that there is no problem with Gitorious setup*, I DELETED the
VHOSTs, and basically pointed everything to gitorious/public/. That is, I
disable www.mydomain.edu and git.mydomain.edu and gitorious could be loaded
from http or https://mydomain.edu. WHen I did this, everything worked fine!!
I could create, delete projects, users, repos, wikis and what not!.
But, if I turn on named vhosts so that I can host my gitorious server at
http or https://*git.*mydomain.edu , stuff breaks with the error I
mentioned.
Finally, I decided to turn off, CSFR. With that turned off, I DO NOT see any
error, BUT, when I click login with any credentials, the page comes back to
the login screen with not message/error, nothing.
Looking forward to any advise. I am keen on using Gitorious for my lab. If
this does not work out, we may have to go back to paying for GitHub :(
Thank you so much!!
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]