Skip to content
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

Has anyone tested this with Redmine 4.2 #3

Open
gaurav-cointab opened this issue Jun 23, 2021 · 2 comments
Open

Has anyone tested this with Redmine 4.2 #3

gaurav-cointab opened this issue Jun 23, 2021 · 2 comments

Comments

@gaurav-cointab
Copy link

Has anyone tested this plugin with 4.2?

If no one has tested, if anyone can guide me on how to make it compatible with 4.2, this could include tinkering with the redmine core, or the repo itself... please let me know.

@iauramchyk
Copy link

iauramchyk commented Sep 21, 2021

Redmine 4.2.2

I started using the plugin on a Unicorn instance with Nginx reverse proxy.
I removed the closed? statement in grack_git_adapter.rb
It throws the following error upon authentification:

NoMethodError (private method `eof?' called for #<Unicorn::TeeInput:0x0000aaaac5cdbd68>):
  
plugins/redmine_git_server/lib/redmine_git_server/grack_git_adapter.rb:11:in `block in command'
plugins/redmine_git_server/lib/redmine_git_server/grack_git_adapter.rb:10:in `popen'
plugins/redmine_git_server/lib/redmine_git_server/grack_git_adapter.rb:10:in `command'

Then I removed the `eof? ' method and this is what you get from git:

nginx proxy-error.log

2021/09/21 01:44:50 [crit] 296979#296979: *10 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 64.62.197.92, server: 0.0.0.0:443
2021/09/21 01:47:00 [error] 296979#296979: *11 upstream prematurely closed connection while reading response header from upstream, client: 37.215.18.52, server: redmine.webelectrica.com, request: "POST /projects/bu40/repository/gong_bu40_fw/git-upload-pack HTTP/1.1", upstream: "http://10.8.0.5:3000/projects/bu40/repository/gong_bu40_fw/git-upload-pack", host: "redmine.webelectrica.com"

nginx proxy-access.log

37.215.18.52 - - [21/Sep/2021:01:44:58 +0000] "GET /projects/bu40/repository/gong_bu40_fw/info/refs?service=git-upload-pack HTTP/1.1" 401 27 "-" "git/2.30.1.windows.1"
37.215.18.52 - ivan [21/Sep/2021:01:44:58 +0000] "GET /projects/bu40/repository/gong_bu40_fw/info/refs?service=git-upload-pack HTTP/1.1" 401 27 "-" "git/2.30.1.windows.1"
37.215.18.52 - ivan [21/Sep/2021:01:44:59 +0000] "GET /projects/bu40/repository/gong_bu40_fw/info/refs?service=git-upload-pack HTTP/1.1" 200 414 "-" "git/2.30.1.windows.1"
37.215.18.52 - ivan [21/Sep/2021:01:47:00 +0000] "POST /projects/bu40/repository/gong_bu40_fw/git-upload-pack HTTP/1.1" 502 150 "-" "git/2.30.1.windows.1"

unicorn.stderr.log

E, [2021-09-21T04:47:00.608485 #5841] ERROR -- : worker=0 PID:5935 timeout (121s > 120s), killing
E, [2021-09-21T04:47:00.655277 #5841] ERROR -- : reaped #<Process::Status: pid 5935 SIGKILL (signal 9)> worker=0
I, [2021-09-21T04:47:00.676007 #6044]  INFO -- : worker=0 ready

redmine.production.log

Processing by GitServerController#info_refs as */*
  Parameters: {"service"=>"git-upload-pack", "id"=>"bu40", "repository_id"=>"gong_bu40_fw", "path"=>"info/refs"}
  Current user: anonymous
(Git Server) Successful authentication for 'ivan' from 37.215.18.52 at 2021-09-21 01:44:58 UTC
Completed 200 OK in 329ms (ActiveRecord: 44.4ms)
Started POST "/projects/bu40/repository/gong_bu40_fw/git-upload-pack" for 37.215.18.52 at 2021-09-21 04:44:59 +0300
Processing by GitServerController#handle_pack as 
  Parameters: {"id"=>"bu40", "repository_id"=>"gong_bu40_fw", "path"=>"git-upload-pack"}
  Current user: anonymous
(Git Server) Successful authentication for 'ivan' from 37.215.18.52 at 2021-09-21 01:44:59 UTC
Completed 200 OK in 42ms (ActiveRecord: 11.0ms)

and git

git.exe clone --progress -v "https://[email protected]/projects/bu40/repository/gong_bu40_fw" "D:\work\projects\current\Rovaland\Gong\Soft_uC_TRC\1\gong_bu40_fw"
Cloning into 'D:\work\projects\current\Rovaland\Gong\Soft_uC_TRC\1\gong_bu40_fw'...
POST git-upload-pack (225 bytes)
error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
fatal: the remote end hung up unexpectedly

@iauramchyk
Copy link

I replaced "unicorn" with "thin" and everything started working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants