-
Notifications
You must be signed in to change notification settings - Fork 117
Cannot assign deploy key to repository with 4.0.0 #742
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
Similar error happens when I try to set up protected branches. Redmine does not allow the request to get through and with the following (probably stupid) patch:
request fails:
No changes happen to gitolite.conf this time. I would be happy to keep debugging and provide all info I can. |
I had the same issue as @Alexey-I - I found a "simple" fix for this without circumventing the CSRF mechanism.
I made the following changes. First adding the token to the form:
Then a fix for whatever happens after the form submission causing the
I did the same for the other modal form templates ( Not knowing if this is caused by different versions of Ruby or Redmine, I have not submitted a PR. Hope this is useful still. |
It would be useful if you could prepare a pull request, so other people impacted by the isseu can take the patch. |
It seems to be a bug is jQuery/Rails UJS : = labelled_form_for :repository_deployment_credential, @credential,
url: repository_deployment_credentials_path(@repository),
html: { method: :post, class: 'tabular', remote: true } do |f|
|
We just updated and are suffering from the same issue. Any change, #759 gets merged anytime soon? |
Patch from comments in issue redmine-git-hosting#742 (redmine-git-hosting#742 (comment))
Solved in #759 |
Hi!
I'm Running redmine on CentOS 8 with the following components:
All the 'Config test' tab is green, all Rugged features are compiled, libgit2 version is 0.28.4.
Gitolite is v3.6.9-0-g144d8a2.
Problem
Go to Repository settings => Add Deployment Credentials, click 'Add Deployment Credential', choose deploy key and access mode, click 'Save'.
Redmine shows a generic error page with the following text: "Error 422 Invalid authencity token".
Error logged:
I'm not Ruby developer but kind of adventurous. Spent some time reading Ruby docs and got an impression (it is probably incorrect) that plugin does not utilize RequestForgeryProtection methods. So I tried this:
It helps to proceed a bit.
Deploy key gets assigned to repository. I see it both on UI (after a page refresh) and in gitolite.conf but the first thing I see after clicking "Save" is a white empty page and an error:
Hope I didn't do something incorrectly and this report is actually of use.
The text was updated successfully, but these errors were encountered: