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

"My public keys" link is still missing the subpath #368

Closed
Phiber2000 opened this Issue Feb 24, 2015 · 13 comments

Comments

Projects
None yet
3 participants
@Phiber2000

Phiber2000 commented Feb 24, 2015

According to #340, I upgraded from v1.0.0 to v1.0.1 successfully. But the "My public keys" link is still missing the subpath.
As I wrote, I did a test upgrade to Redmine v3.0.0 and the link is complete. But the plugin seems to have a compatibility issues here (f.e. can't acces repository tab), so I still have to use Redmine v2.6.2.

@n-rodriguez n-rodriguez added the bug label Feb 24, 2015

@n-rodriguez n-rodriguez self-assigned this Feb 24, 2015

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 24, 2015

Member

As I wrote, I did a test upgrade to Redmine v3.0.0 and the link is complete. But the plugin seems to have a compatibility issues here (f.e. can't acces repository tab), so I still have to use Redmine v2.6.2.

Work on Redmine 3.0 compatibility is in progress ;)

Member

n-rodriguez commented Feb 24, 2015

As I wrote, I did a test upgrade to Redmine v3.0.0 and the link is complete. But the plugin seems to have a compatibility issues here (f.e. can't acces repository tab), so I still have to use Redmine v2.6.2.

Work on Redmine 3.0 compatibility is in progress ;)

@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Feb 24, 2015

Great! It isn't urgent.
In the meanwhile it's done by using the admin panel or inserting the missing subpath manually.

Maybe nice to know:

  • Debian wheezy
  • Redmine version 2.6.2.stable
  • Ruby version 1.9.3-p194
  • Rails version 3.2.21
  • Database adapter Mysql2
  • redmine_bootstrap_kit 0.2.0
  • redmine_git_hosting 1.0.1
  • nginx 1.6.2
  • Phusion Passenger 4.0.59

nginx mode: HTTPS only
repository access: via SSH & HTTPS

No changes in any files had to be made!

That's the only bug I got reported in the last two weeks.
Repository access and redmine notification works like a charm. That's how to have fun at work.

In production environment I upgraded from plugin version 0.7.4 following the migration instructions exactly, in a test environment I did a clean install - no problems at all.
Great job, awesome plugin!

Phiber2000 commented Feb 24, 2015

Great! It isn't urgent.
In the meanwhile it's done by using the admin panel or inserting the missing subpath manually.

Maybe nice to know:

  • Debian wheezy
  • Redmine version 2.6.2.stable
  • Ruby version 1.9.3-p194
  • Rails version 3.2.21
  • Database adapter Mysql2
  • redmine_bootstrap_kit 0.2.0
  • redmine_git_hosting 1.0.1
  • nginx 1.6.2
  • Phusion Passenger 4.0.59

nginx mode: HTTPS only
repository access: via SSH & HTTPS

No changes in any files had to be made!

That's the only bug I got reported in the last two weeks.
Repository access and redmine notification works like a charm. That's how to have fun at work.

In production environment I upgraded from plugin version 0.7.4 following the migration instructions exactly, in a test environment I did a clean install - no problems at all.
Great job, awesome plugin!

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 24, 2015

Member

Great job, awesome plugin!

Thank you :)

Btw, note that the support of Ruby 1.9.3 has ended : https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/

Member

n-rodriguez commented Feb 24, 2015

Great job, awesome plugin!

Thank you :)

Btw, note that the support of Ruby 1.9.3 has ended : https://www.ruby-lang.org/en/news/2014/01/10/ruby-1-9-3-will-end-on-2015/

@n-rodriguez n-rodriguez added this to the v1.0.2 milestone Feb 25, 2015

@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Feb 25, 2015

Unfortunately 8263b07 is no fix for Redmine v2.6.2.

Phiber2000 commented Feb 25, 2015

Unfortunately 8263b07 is no fix for Redmine v2.6.2.

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 25, 2015

Member

Unfortunately 8263b07 is no fix for Redmine v2.6.2.

Weird... I've done some tests and it seems to work :

in redmine/config/routes.rb :

Redmine::Utils::relative_url_root = "/redmine"

RedmineApp::Application.routes.draw do
scope Redmine::Utils::relative_url_root do
# RedmineApp::Application.routes.draw do
  root :to => 'welcome#index', :as => 'home'
  ....
end
end
redmine$ rake routes``` :
routes before
...
                           public_keys GET          /redmine/my/public_keys(.:format)                                                              gitolite_public_keys#index
                                       POST         /redmine/my/public_keys(.:format)                                                              gitolite_public_keys#create
                        new_public_key GET          /redmine/my/public_keys/new(.:format)                                                          gitolite_public_keys#new
                       edit_public_key GET          /redmine/my/public_keys/:id/edit(.:format)                                                     gitolite_public_keys#edit
                            public_key GET          /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#show
                                       PUT          /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#update
                                       DELETE       /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#destroy
      download_git_revision_repository GET          /redmine/repositories/:id/download_revision(.:format)                                          download_git_revision#index
                 repository_git_extras PUT          /redmine/repositories/:repository_id/git_extras(.:format)                                      repository_git_extras#update
          repository_git_notifications POST         /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#create
      new_repository_git_notifications GET          /redmine/repositories/:repository_id/git_notifications/new(.:format)                           repository_git_notifications#new
     edit_repository_git_notifications GET          /redmine/repositories/:repository_id/git_notifications/edit(.:format)                          repository_git_notifications#edit
                                       GET          /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#show
                                       PUT          /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#update
                                       DELETE       /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#destroy
          repository_post_receive_urls GET          /redmine/repositories/:repository_id/post_receive_urls(.:format)                               repository_post_receive_urls#index
                                       POST         /redmine/repositories/:repository_id/post_receive_urls(.:format)                               repository_post_receive_urls#create
       new_repository_post_receive_url GET          /redmine/repositories/:repository_id/post_receive_urls/new(.:format)                           repository_post_receive_urls#new
...
routes after

From http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI#Using-UnicornNginx

Member

n-rodriguez commented Feb 25, 2015

Unfortunately 8263b07 is no fix for Redmine v2.6.2.

Weird... I've done some tests and it seems to work :

in redmine/config/routes.rb :

Redmine::Utils::relative_url_root = "/redmine"

RedmineApp::Application.routes.draw do
scope Redmine::Utils::relative_url_root do
# RedmineApp::Application.routes.draw do
  root :to => 'welcome#index', :as => 'home'
  ....
end
end
redmine$ rake routes``` :
routes before
...
                           public_keys GET          /redmine/my/public_keys(.:format)                                                              gitolite_public_keys#index
                                       POST         /redmine/my/public_keys(.:format)                                                              gitolite_public_keys#create
                        new_public_key GET          /redmine/my/public_keys/new(.:format)                                                          gitolite_public_keys#new
                       edit_public_key GET          /redmine/my/public_keys/:id/edit(.:format)                                                     gitolite_public_keys#edit
                            public_key GET          /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#show
                                       PUT          /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#update
                                       DELETE       /redmine/my/public_keys/:id(.:format)                                                          gitolite_public_keys#destroy
      download_git_revision_repository GET          /redmine/repositories/:id/download_revision(.:format)                                          download_git_revision#index
                 repository_git_extras PUT          /redmine/repositories/:repository_id/git_extras(.:format)                                      repository_git_extras#update
          repository_git_notifications POST         /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#create
      new_repository_git_notifications GET          /redmine/repositories/:repository_id/git_notifications/new(.:format)                           repository_git_notifications#new
     edit_repository_git_notifications GET          /redmine/repositories/:repository_id/git_notifications/edit(.:format)                          repository_git_notifications#edit
                                       GET          /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#show
                                       PUT          /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#update
                                       DELETE       /redmine/repositories/:repository_id/git_notifications(.:format)                               repository_git_notifications#destroy
          repository_post_receive_urls GET          /redmine/repositories/:repository_id/post_receive_urls(.:format)                               repository_post_receive_urls#index
                                       POST         /redmine/repositories/:repository_id/post_receive_urls(.:format)                               repository_post_receive_urls#create
       new_repository_post_receive_url GET          /redmine/repositories/:repository_id/post_receive_urls/new(.:format)                           repository_post_receive_urls#new
...
routes after

From http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI#Using-UnicornNginx

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 25, 2015

Member

With Redmine 2.6.1 :
capture d ecran de 2015-02-25 19 48 44

Member

n-rodriguez commented Feb 25, 2015

With Redmine 2.6.1 :
capture d ecran de 2015-02-25 19 48 44

@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Feb 25, 2015

In your answer was the hint for solving the problem.
I added the "relative_url_root" lines in Redmines routes.rb. But to get this working correctly, I had to remove the passenger_base_uri from the nginx virtual host definition of the redmine page.
According to the Redmine wiki, I don't think, that's the "simplest, cleanest and most flexible solution" (it wasn't necessary in older version of the plugin - in Redmine 3.x won't be too) - it works, but performance is horrible!!

I'm pretty sure, that it's introduced with 3e5ffef. But I'm with you, that using hooks is the better way. Maybe something's just missing in add_public_keys_link.rb? I'm no Ruby developer.

I found a simple solution:
In 'lib/redmine_git_hosting/hooks/add_public_keys_link.rb' change:
"...l(:label_my_public_keys), public_keys_path, class:..." to
"...l(:label_my_public_keys), 'public_keys', class:..."

That's all!

Phiber2000 commented Feb 25, 2015

In your answer was the hint for solving the problem.
I added the "relative_url_root" lines in Redmines routes.rb. But to get this working correctly, I had to remove the passenger_base_uri from the nginx virtual host definition of the redmine page.
According to the Redmine wiki, I don't think, that's the "simplest, cleanest and most flexible solution" (it wasn't necessary in older version of the plugin - in Redmine 3.x won't be too) - it works, but performance is horrible!!

I'm pretty sure, that it's introduced with 3e5ffef. But I'm with you, that using hooks is the better way. Maybe something's just missing in add_public_keys_link.rb? I'm no Ruby developer.

I found a simple solution:
In 'lib/redmine_git_hosting/hooks/add_public_keys_link.rb' change:
"...l(:label_my_public_keys), public_keys_path, class:..." to
"...l(:label_my_public_keys), 'public_keys', class:..."

That's all!

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Mar 13, 2015

Unfortunately that's already the way It was configured before, too.

Phiber2000 commented Mar 13, 2015

Unfortunately that's already the way It was configured before, too.

@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Mar 15, 2015

  1. Problem's gone using Redmine v3.x since Git hosting plugin got compatible with e206d1d (1.0.2).
  2. If Redmine v2.x has to be used, cf276cd still had to be applied here.

My conclusion:

  • The issue seems to be caused by a Redmine bug and how v2.x handles the hook - not by the plugin!
  • Plugins version 1.0.2 released 2 days ago allowed me to migrate to Redmine v3.x - so the plugin developer did a great job again!

Phiber2000 commented Mar 15, 2015

  1. Problem's gone using Redmine v3.x since Git hosting plugin got compatible with e206d1d (1.0.2).
  2. If Redmine v2.x has to be used, cf276cd still had to be applied here.

My conclusion:

  • The issue seems to be caused by a Redmine bug and how v2.x handles the hook - not by the plugin!
  • Plugins version 1.0.2 released 2 days ago allowed me to migrate to Redmine v3.x - so the plugin developer did a great job again!
@mqu

This comment has been minimized.

Show comment
Hide comment
@mqu

mqu Feb 1, 2016

hello,

I am having same problem with a fresh install with Redmine 3.2 and redmine_git_hosting 1.2.0.

Environment:
  Redmine version                3.2.0.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
  Xitolite                       2.1.4
Redmine plugins:
  redmine_bootstrap_kit          0.2.4
  redmine_git_hosting            1.2.0

mqu commented Feb 1, 2016

hello,

I am having same problem with a fresh install with Redmine 3.2 and redmine_git_hosting 1.2.0.

Environment:
  Redmine version                3.2.0.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.5
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
  Xitolite                       2.1.4
Redmine plugins:
  redmine_bootstrap_kit          0.2.4
  redmine_git_hosting            1.2.0
@Phiber2000

This comment has been minimized.

Show comment
Hide comment
@Phiber2000

Phiber2000 Feb 1, 2016

Try this fix: Phiber2000@f9aa20c (relating #472)

Phiber2000 commented Feb 1, 2016

Try this fix: Phiber2000@f9aa20c (relating #472)

@mqu

This comment has been minimized.

Show comment
Hide comment
@mqu

mqu Feb 1, 2016

thanks Phiber2000.

mqu commented Feb 1, 2016

thanks Phiber2000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment