-
Notifications
You must be signed in to change notification settings - Fork 117
Force push only when "manage repository" permission? #264
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
Comments
What do you mean by 'users can't force push to their feature branches' ? |
We are using git Flow. Before merging the feature branch to the develop branch we do code reviews. For that the branch will be pushed to the remote. After the code review they need to rebase their branch onto the latest develop commit. This changes the history and now the local and remote branches differ. They need to do a git push --force to update the remote before using git flow feature finish. They can't force push if they don't have that permission. |
What was the previous version? (before migration) |
I'm not sure, some version of 0.6 I think |
Yes. That's what I thought. At the time, the plugin only managed 2 types of permissions : RW+ and R.
According to Gitolite (http://gitolite.com/gitolite/conf.html#rules) :
|
Okay, that's bad. Can you maybe introduce a separate permission for that? We don't want normal developers to be able to edit the repository settings of a project, but they should be able to force push branches. Even better would be, if there would be a possibility to define patterns to allow force push to (everything feature/, hotfix/, release/* but never master and develop). |
Test the v0.8-beta branch. It has the |
Tried:
with test and development gems installed I'm now stuck on:
|
My bad, I should have warned you : https://jbox-web.github.io/redmine_git_hosting/guide/development/ |
Ah, okay. Unfortunately:
|
Second try worked o_O |
Yes. You have to fix it by hand. Basically : go in your database (https://code.google.com/p/sqlyog/wiki/Downloads) and rename the version |
Weird...but why not :) |
And one step further:
|
Ok. Wait a minute, I'm working on it :) |
Okay ;) |
Can you do a |
Done:
|
Be sure you have removed |
No change :( |
Can you go in Administration -> Redmine Git Hosting -> Config Checks and check that everything is green? |
Unfortunately I'm now getting an error 500:
|
I know, I got the same :) |
Okay, tested it, looks like it works great :) Now we only need to be able to allow roles / groups to force push to feature-Branches. |
Just noticed that git mirrors settings do not load:
|
Just updated, works again. |
Hi there! |
Not quite, or is "Now we only need to be able to allow roles / groups to force push to feature-Branches." already implemented? :) |
mmm.... Actually I don't know ^^ Have to check. |
Also, it would be great to be able to set default values for new repos so that we can configure it globally and each new repo uses these settings. |
Hi all, I read the whole thread, and I would like to know how this feature will work. Here, developers also need to force some push to be able to finish their rebase step. I tried to implement a Gitolite pre-receive hook to do that :
The hook is working well, but then redmine_git_hosting denies the push because the user does not have the RW+ permission (and I don't want to set it !). I understand that the v0.8-beta version include a feature to protected some branches from push force. But it would be better for me to have an option to allow "push force" on a set of specified branches only (and deny all other branches). What do you think ? Any help would be appreciated. |
Hi all, I tried to install the v0.8-beta branch. My first try return an error which indicates that the task From the root redmine directory, I then tried again the command :
What are the steps to migrate ot this devel branch ? Thank you ! |
OK, I get it. I should use |
As said @hameno, this task failed the first time and succeed the second time. However, I verified into the database and all migration numbers have been correctly migrated. Then, I checked out the v0.8-beta branch, and proceed to the plugin migration and all work has expected. I will see if new functionnalities work as expected. |
Hi all, @n-rodriguez, is your fix 9b13720 on v0.8-branch ? I have the same error as described by @hameno with a |
yes
this might come from other place By the way, the v0.8 branch has been dropped in favor of v1.0.0-beta. |
So, I tried to update my beta installation, saw that the branch no longer exists and switched to v1.0.0-beta. But now I cannot edit any repository, it just shows the standard settings but no settings from this plugin. I also tried the latest devel branch but it did not change anything. My installation: Environment: |
Ahhh, I just notices that there is now a "Xitolite" Repository-Type. Just created a new Repository with that and there are the settings. Did I forget a migration task? |
Nope, it's my fault, I didn't write it yet... But it should be simple : if you can connect to Redmine database update the |
Yep, worked. Looks good now. |
Great! You can take a look at the changelog There might be other interesting features for you. |
Ahh so a release date is already planned, thats nice ;) Really great work! 👍 |
Great, now all we need is #264 (comment) |
The regression has been fixed by the Protected branch feature. |
Hello,
I just recently upgraded to 0.7.6 and now users can't force push to their feature branches when they don't have the manage repository permission. How can I disable this? We need to be able to force push our rebased feature branches and not every developer should be able to manage the repository.
Please advise
The text was updated successfully, but these errors were encountered: