New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin deletes all gitolite mirroring attributes #415

Closed
ghost opened this Issue Apr 8, 2015 · 16 comments

Comments

Projects
None yet
4 participants
@ghost

ghost commented Apr 8, 2015

Hi Nicolas,

We are using the gitolite mirroring feature (http://gitolite.com/gitolite/mirroring.html), which requires to add attributes to the repository description in gitolite.conf such as:
repo foo
...access rules...

option mirror.master        =   mars
option mirror.slaves        =   phobos deimos
option mirror.redirectOK    =   all

We have setup such mirroring for some of our redmine managed repos and it works fine, until someone makes changes through redmine, e.g. adding new project members.
At this point, the repo configuration is rewritten and the mirroring attributes are lost.

Do you think it would be possible that all attributes that the plugin does not manage be kept as they are found?

If you agree with that design and are willing to head me to the code where the rewrite operation is done, I'd fork and suggest a pull request with pleasure.

Please let me know and thank you for this great plugin!

Cheers,

Paolo

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Apr 9, 2015

Member

Hi Paolo!

Why not using the provided mirroring feature?

Member

n-rodriguez commented Apr 9, 2015

Hi Paolo!

Why not using the provided mirroring feature?

@n-rodriguez n-rodriguez self-assigned this Apr 9, 2015

@n-rodriguez n-rodriguez added the question label Apr 9, 2015

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 10, 2015

Hi Nicolas,

We need a two way mirroring between a private (intranet) gitolite and a public (internet acces but restricted to authorised users) gitolite, both of them being administrated by us.

Does the provided feature support two way mirroring ?
Does it support mirroring to another gitolite managed server ?

Thank you in advance.

Cheers,

Paolo

ghost commented Apr 10, 2015

Hi Nicolas,

We need a two way mirroring between a private (intranet) gitolite and a public (internet acces but restricted to authorised users) gitolite, both of them being administrated by us.

Does the provided feature support two way mirroring ?
Does it support mirroring to another gitolite managed server ?

Thank you in advance.

Cheers,

Paolo

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Apr 10, 2015

Member

Does the provided feature support two way mirroring ?

No.

Does it support mirroring to another gitolite managed server ?

Yes. (actually it supports mirroring to any Git repository)

But I'm not sure this will fit your needs...

Member

n-rodriguez commented Apr 10, 2015

Does the provided feature support two way mirroring ?

No.

Does it support mirroring to another gitolite managed server ?

Yes. (actually it supports mirroring to any Git repository)

But I'm not sure this will fit your needs...

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 13, 2015

Hi,

Thank you for your answers.

Well we do need the two way mirroring.

So do you think my suggestion that mirroring attributes (and perhaps any gitolite attribute not managed by the plugin) should be kept as is makes sense?

If yes, as I was telling you, I could do the job, provided that you give me a few hints on where to start.

Thank you in advance.

Paolo

ghost commented Apr 13, 2015

Hi,

Thank you for your answers.

Well we do need the two way mirroring.

So do you think my suggestion that mirroring attributes (and perhaps any gitolite attribute not managed by the plugin) should be kept as is makes sense?

If yes, as I was telling you, I could do the job, provided that you give me a few hints on where to start.

Thank you in advance.

Paolo

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 5, 2015

Hi Nicolas,

Any news on this topic?

Thank you in advance.

Paolo

ghost commented May 5, 2015

Hi Nicolas,

Any news on this topic?

Thank you in advance.

Paolo

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez May 5, 2015

Member

Hi Paolo,

Unfortunately no. If you want to work on this you can take a look a these classes :

RepositoryUpdater inherits from RepositoryHandler which defines most of the instance methods needed to update a repository config.

The real things happen here https://github.com/jbox-web/redmine_git_hosting/blob/devel/lib/redmine_git_hosting/gitolite_handlers/repository_handler.rb#L61

Member

n-rodriguez commented May 5, 2015

Hi Paolo,

Unfortunately no. If you want to work on this you can take a look a these classes :

RepositoryUpdater inherits from RepositoryHandler which defines most of the instance methods needed to update a repository config.

The real things happen here https://github.com/jbox-web/redmine_git_hosting/blob/devel/lib/redmine_git_hosting/gitolite_handlers/repository_handler.rb#L61

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 11, 2015

Thank you very much, I'll do my best!

Cheers,

Paolo

ghost commented May 11, 2015

Thank you very much, I'll do my best!

Cheers,

Paolo

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jun 2, 2015

Member

Hi Paolo! Any news?

Member

n-rodriguez commented Jun 2, 2015

Hi Paolo! Any news?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 2, 2015

Hi Nicolas,
No, sorry. May is not the most productive month nearby :-)
I don't see that I'll be able to work on the topic in the close future, I'll publish a proposal to work on this to my colleagues.
Wait and see...

ghost commented Jun 2, 2015

Hi Nicolas,
No, sorry. May is not the most productive month nearby :-)
I don't see that I'll be able to work on the topic in the close future, I'll publish a proposal to work on this to my colleagues.
Wait and see...

@alessandroleite

This comment has been minimized.

Show comment
Hide comment
@alessandroleite

alessandroleite Jun 2, 2015

Hello @n-rodriguez
I've talked with @paolosystemx, and I will work on this issue.
All best.

alessandroleite commented Jun 2, 2015

Hello @n-rodriguez
I've talked with @paolosystemx, and I will work on this issue.
All best.

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jun 4, 2015

Member

@alessandroleite Great! May the force be with you!

Member

n-rodriguez commented Jun 4, 2015

@alessandroleite Great! May the force be with you!

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jul 5, 2015

Member

Hi! I've added support for Gitolite option in commit : 7b7e458.
Next to 'Git config keys' you'll be able to add 'Gitolite options' such as your mirroring options :)

Member

n-rodriguez commented Jul 5, 2015

Hi! I've added support for Gitolite option in commit : 7b7e458.
Next to 'Git config keys' you'll be able to add 'Gitolite options' such as your mirroring options :)

@n-rodriguez n-rodriguez added this to the v1.2.0 milestone Jul 5, 2015

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jul 5, 2015

Member

Example :

repo    blibl
  RW+                            = redmine_admin
  -     master                   = redmine_developer1 redmine_developer2 redmine_developer3
  -     refs/tags/v[0-9]         = redmine_developer1 redmine_developer2
  RW+   dev/                     = redmine_developer1 redmine_developer2 redmine_developer3
  RW                             = redmine_developer1 redmine_developer2 redmine_developer3
  R                              = redmine_reporter1
  config redminegitolite.projectid = blibl
  config redminegitolite.repositoryid = 
  config redminegitolite.repositorykey = bMs2qj6sPl1ttTZJH5vWJOClIQ2V8ZhwK2d7Szy1CnSDX0EYzE7SuTgAnyrVS7b
  config http.uploadpack = true
  config http.receivepack = true
  config multimailhook.enabled = false
  option mirror.master = mars
  option mirror.slaves = phobos deimos
  option mirror.redirectOK = all
Member

n-rodriguez commented Jul 5, 2015

Example :

repo    blibl
  RW+                            = redmine_admin
  -     master                   = redmine_developer1 redmine_developer2 redmine_developer3
  -     refs/tags/v[0-9]         = redmine_developer1 redmine_developer2
  RW+   dev/                     = redmine_developer1 redmine_developer2 redmine_developer3
  RW                             = redmine_developer1 redmine_developer2 redmine_developer3
  R                              = redmine_reporter1
  config redminegitolite.projectid = blibl
  config redminegitolite.repositoryid = 
  config redminegitolite.repositorykey = bMs2qj6sPl1ttTZJH5vWJOClIQ2V8ZhwK2d7Szy1CnSDX0EYzE7SuTgAnyrVS7b
  config http.uploadpack = true
  config http.receivepack = true
  config multimailhook.enabled = false
  option mirror.master = mars
  option mirror.slaves = phobos deimos
  option mirror.redirectOK = all
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jul 20, 2015

Thank you @n-rodriguez , we'll try this ASAP!

ghost commented Jul 20, 2015

Thank you @n-rodriguez , we'll try this ASAP!

@timoc

This comment has been minimized.

Show comment
Hide comment
@timoc

timoc Jun 10, 2016

Hi,

I have a similar requirement. Did this work for you?

timoc commented Jun 10, 2016

Hi,

I have a similar requirement. Did this work for you?

@paolo-crisafulli

This comment has been minimized.

Show comment
Hide comment
@paolo-crisafulli

paolo-crisafulli Jul 13, 2016

@timoc , yes, it works fine for us.
Our config:

  • redmine 3.3.0
  • redmine-git-hosting 1.2.0
  • gitolite3 v3.6.4-0-g93e6524 on git 1.9.1

paolo-crisafulli commented Jul 13, 2016

@timoc , yes, it works fine for us.
Our config:

  • redmine 3.3.0
  • redmine-git-hosting 1.2.0
  • gitolite3 v3.6.4-0-g93e6524 on git 1.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment