Project

General

Profile

Redmine GitAuth / Gitosis integration

Added by Anonymous over 14 years ago

Hello,

I am currently looking into an integration of Redmine and GitAuth (a ruby clone of Gitosis). What I am looking for, is, that each user can add her SSH-Key to Redmine, and this Key is then synced to GitAuth.

Furthermore a kind of administration interface inside Redmine would be nice as well.

Is there anything already out there?


Replies (18)

RE: Redmine GitAuth / Gitosis integration - Added by Daniel Nauck over 14 years ago

Hi,

that would be a nice feature.
There is already issue #2525 for this.

RE: Redmine GitAuth / Gitosis integration - Added by Anonymous over 14 years ago

Indeed there is the issue #2525, but I still do think, that this kind of functionality shouldn't be implemented totally from scratch but use existing functionality like GitAuth or even Gitosis (well, it is Python, but anyway...). Furthermore, it would be great, if the patch from #2525 would be migrated to something more like a plugin.

Does anybody know if this would be feasible?

RE: Redmine GitAuth / Gitosis integration - Added by Matthieu Codron over 14 years ago

I don't know at all how feasible it is, but I much more enjoy a gitolite integration than a gitosis one...

RE: Redmine GitAuth / Gitosis integration - Added by Eric Davis about 14 years ago

If you implement it, I'll probably use it (I run a private gitosis server right now).

Eric Davis

RE: Redmine GitAuth / Gitosis integration - Added by Jan from Planio www.plan.io about 14 years ago

We're using Gitosis for Planio as well, if you like, check out our plugin on Github

RE: Redmine GitAuth / Gitosis integration - Added by Paryank Kansara almost 14 years ago

Sounds very good and interesting. This is what I was looking for since a long time.

I have just downloaded plugin and installed it on my redmine. But I cannot see anything related to it in redmine. Can you please guide me, what steps I have to follow to use this plugin?

Thank you very much.

RE: Redmine GitAuth / Gitosis integration - Added by Andre Silva almost 14 years ago

Hello,

I have a problem with save project with redmine-gitosis installed

Processing ProjectsController#list_files (for 187.25.170.217 at 2008-10-03 02:02:43) [GET]
Parameters: {"action"=>"list_files", "id"=>"customer-hiper", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/list_files
Completed in 39ms (View: 28, DB: 2) | 200 OK [http://redmine.eximbiz.com.br/projects/customer-hiper/files]

Processing RepositoriesController#show (for 187.25.170.217 at 2008-10-03 02:02:46) [GET]
Parameters: {"action"=>"show", "id"=>"customer-hiper", "controller"=>"repositories"}
The revision '' has a wrong format

Errno::ENOENT (No such file or directory - /tmp/redmine-gitosis-1223010166/gitosis/gitosis.conf):
inifile (0.3.0) lib/inifile.rb:67:in `initialize'
inifile (0.3.0) lib/inifile.rb:67:in `open'
inifile (0.3.0) lib/inifile.rb:67:in `write'
/usr/lib/ruby/1.8/lockfile.rb:284:in `lock'
/usr/lib/ruby/1.8/lockfile.rb:539:in `attempt'
/usr/lib/ruby/1.8/lockfile.rb:539:in `catch'
/usr/lib/ruby/1.8/lockfile.rb:539:in `attempt'
/usr/lib/ruby/1.8/lockfile.rb:539:in `loop'
/usr/lib/ruby/1.8/lockfile.rb:539:in `attempt'
/usr/lib/ruby/1.8/lockfile.rb:210:in `lock'
/usr/lib/ruby/1.8/lockfile.rb:199:in `initialize'
/usr/lib/ruby/1.8/lockfile.rb:559:in `new'
/usr/lib/ruby/1.8/lockfile.rb:559:in `Lockfile'
vendor/plugins/redmine_gitosis/app/models/gitosis_observer.rb:21:in `update_repositories'
vendor/plugins/redmine_gitosis/app/models/gitosis_observer.rb:13:in `after_save'
/usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'
/usr/lib/ruby/1.8/observer.rb:184:in `each'
/usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'
app/models/repository.rb:42:in `scm'
app/models/repository.rb:75:in `default_branch'
app/controllers/repositories_controller.rb:206:in `find_repository'
passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/railsapps/redmine.eximbiz.com.br/public/500.html (500 Internal Server Error)

RE: Redmine GitAuth / Gitosis integration - Added by Timothy Allen almost 14 years ago

I just fixed this error.

Errno::ENOENT (No such file or directory - /tmp/redmine-gitosis-1223010166/gitosis/gitosis.conf):

It's caused by not properly setting up your ssh key (id_rsa) which should be located in the .ssh directory of the user running the passenger process.

The best way to test that it is working is to go to the plugin lib/redmine-gitosis.rb file and look through all of the console commands it is generating and then manually execute the commands.

RE: Redmine GitAuth / Gitosis integration - Added by Jiří Znamenáček over 13 years ago

I'm lost, any help appreciated :)

I've tried redmine_gitosis plugin (version 0.0.1 and 0.0.5 I think) with latest Redmine trunk on Ubuntu Server 10.04. My directory layout is like this, everything belongs to the same user (git), .ssh/id_rsa.pub for this user is copied to the redmine/vendor/plugins/redmine_gitosis/extra/ssh as private_key:

  .ssh
  gitosis
  redmine
  repositories

Gitosis without Redmine is working fine. As for Redmine integration I can add ssh-key and assign repository SCM. The first entry of repository fails (always, in all combinations I've tried) with error almost like the one above, just the missing file is the ssh-key of the current user. However the reload of this error page renders the right welcome page about non-existing repository and instructions for its creation.

Weirdness doesn't end here :) I can't push (and thus create) to this repository. I've even tried the patch from #2525 instead of this plugin but I end up with "failed password for invalid user". Judging from my experience with Gitorious there is some stupid error with keys and rights on my part but I simply don't know where else to look.

Thanks for any help,
JZ

RE: Redmine GitAuth / Gitosis integration - Added by Danilo Pires over 13 years ago

The same here.

I'd like to know if I must use gitosis in the localhost environment or can I use it on a remote gitosis server?? Cause I've already tried everything I could and as the others there's no way I can make redmine_gitosis plugin work. The Gitosis work fine without the plugin, but the integration is still a mistery.

I must be doing something wrong because if plan.io and others are able to work with that. =)

Please, just like the friends above I'd like to ask for a help (howto).

Thanks.

RE: Redmine GitAuth / Gitosis integration - Added by Jiří Znamenáček over 13 years ago

Muntek Singh wrote:

Here is a decent guide: http://xdissent.com/2010/05/04/github-clone-with-redmine/

Thanks, that helped! Sure, I didn't use it to reinstall everything :) But it helped me to find my error. As I expected - wrong keys in wrong places, as always...

RE: Redmine GitAuth / Gitosis integration - Added by Jamie Carl about 13 years ago

I've been battling with getting this plugin running for a few hours now and I've come across a few pretty obvious and silly bugs. Keep in mind that I'm not a Ruby programmer and redmine is my first exposure to Ruby, here's what I found.

STATUS_ACTIVE is defined as 1 and STATUS_LOCKED as 0. However the database definition has the "active" column of type boolean, so eve if everything is set up correctly, this bombs out (at least on postgresql) because 1 != TRUE. Setting the def to integer with DEFAULT => 1 and re-migrating fixed the problem.

Then, a small hiccup, app/helpers/gitosis_public_keys_helper.rb still refers to active using true/false. So I changed it thusly:

["#{l(:status_active)} (#{key_count_by_active[1].to_i})", GitosisPublicKey::STATUS_ACTIVE],
["#{l(:status_locked)} (#{key_count_by_active[0].to_i})", GitosisPublicKey::STATUS_LOCKED]], selected)

So it now correctly shows the counts in the public keys screen in my account.

Whats going on with this plugin? These errors seem quite obvious. Why am I the only one to have noticed them? Looks like a half assed attempt to change the "active" database field from integer to boolean. Either that or it's a postgres thing and I'm the only person in the world using the plugin on postgres?

RE: Redmine GitAuth / Gitosis integration - Added by Bernat Foj about 13 years ago

Hi Jamie,

In fact that works with mysql, I guess that's why it went unnoticed.

But I think the plugin is pretty broken and unreliable. I'm looking for a more maintained version, probably this one is a candidate:

github.com/xdissent/redmine_gitosis

(sorry that I can't link, redmine thinks it's spam...)

RE: Redmine GitAuth / Gitosis integration - Added by x c about 13 years ago

Jiří Znamenáček wrote:

Muntek Singh wrote:

Here is a decent guide: http://xdissent.com/2010/05/04/github-clone-with-redmine/

Thanks, that helped! Sure, I didn't use it to reinstall everything :) But it helped me to find my error. As I expected - wrong keys in wrong places, as always...

Could you tell how to change the place,I installed the git followed this page,but it still give the same error with yours.Thanks a lot!

RE: Redmine GitAuth / Gitosis integration - Added by Jakov Sosic over 11 years ago

Hi.

What is the status of this plugin? Redmine 2.x runs on Rails 3, and this plugin has been written for the Rails 2.x. I've fixed few of the issues but I'm not a ruby pro... I will put patches if anyone is interested in getting this thing trough and getting it to work on Redmine 2.0 and Rails 3.2.

Otherwise, is there any alternative?

RE: Redmine GitAuth / Gitosis integration - Added by Petr Cervenka over 11 years ago

I can not get this plugin working under 1.4.x branch , any idea where is the newest GiT repo?

thanks
petr

RE: Redmine GitAuth / Gitosis integration - Added by Sergio Cambra over 11 years ago

I have updated this plugin to Redmine 2.0, I haven't tested with 2.1 yet
http://github.com/scambra/redmine_gitosis

    (1-18/18)