Назад | Перейти на главную страницу

Невозможно нажать на gitlab с помощью ssh через узел перехода

Я пытаюсь отправить репозиторий git с моего локального компьютера на сервер gitlab, который находится за брандмауэром. Я могу подключиться по ssh к машине за брандмауэром, поэтому я настроил ~/.ssh/config так что соединения с gitlab проходят через вторую машину как «узел перехода».

В самый первый раз, когда я запустил это локальное репо, после создания проекта в веб-интерфейсе gitlab, push сработал. Теперь, каждый раз, когда я пытаюсь, кажется, что это толчок, но в конце он дает мне:

Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

Я пробовал со следующим ~/.ssh/config:

host jumphost
hostname <jumphost_ip>
user userA

host gitlab
hostname <gitlab_ip>
user git
#ProxyCommand ssh -v jumphost nc %h %p
proxycommand ssh -v -W %h:%p jumphost
#proxyjump jumphost

host *
#controlmaster auto
#controlpath ~/.ssh/%r@%h:%p
#controlpersist 1m
tcpkeepalive yes
serveraliveinterval 120

Я пробовал 3 варианта «хоста прыжка», которые нашел в Интернете. Я пробовал из WSL (Bash в Windows) с ssh версии 6.6.1p1 и git 1.9.1. Я также пробовал из установщика git Windows с ssh 7.3p1 и git 2.12.2.

С -v добавлена ​​команда, я получаю много нормально выглядящего вывода, но в конце она показывает:

...
debug1: Authentication succeeded (publickey).
Authenticated to <jumphost_ip> ([<jumphost_ip>]:22).
debug1: channel_connect_stdio_fwd <gitlab_ip>:22
debug1: channel 0: new [stdio-forward]
debug1: getpeername failed: Bad file descriptor
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
Counting objects: 55, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (20/20), 711.75 KiB | 0 bytes/s, done.
Total 20 (delta 10), reused 11 (delta 1)
debug1: channel 0: FORCE input drain
debug1: stdio forwarding: done
Connection to <gitlab_ip> closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

В более новых версиях отображается то же самое, за исключением «packet_write_wait: Connection to UNKNOWN port 65535: Broken pipe» вместо «Connection to closed by remote host.».

Я пытался включить controlmaster думая, что, возможно, связи закрываются раньше, и это будет держать их открытыми. Я продолжал получать ту же ошибку на старых версиях, а новые версии даже не инициировали соединение.

Отправка не отображается на сервере.

Кто-нибудь видел эту проблему раньше? Не похоже, чтобы это было что-то необычное для установки.

РЕДАКТИРОВАТЬ С участием LogLevel debug3, вывод в конце выглядит так:

Authenticated to <gitlab_ip> (via proxy).
debug2: fd 3 setting O_NONBLOCK
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env SHELL
debug3: Ignored env TERM
debug3: Ignored env USER
debug3: Ignored env NAME
debug3: Ignored env LS_COLORS
debug3: Ignored env HOSTTYPE
debug3: Ignored env PATH
debug3: Ignored env PWD
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env LOGNAME
debug3: Ignored env LESSOPEN
debug3: Ignored env LESSCLOSE
debug3: Ignored env OLDPWD
debug3: Ignored env _
debug3: Ignored env GIT_PREFIX
debug1: Sending command: git-receive-pack '<repo>'
debug2: channel 0: request exec confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
Counting objects: 55, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (20/20), 711.75 KiB | 0 bytes/s, done.
Total 20 (delta 10), reused 11 (delta 1)
debug2: channel 0: read<=0 rfd 3 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug2: channel 0: rcvd adjust 111231
debug2: channel 0: rcvd adjust 98556
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: channel 0: FORCE input drain
debug2: channel 0: rcvd close
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug1: stdio forwarding: done
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o0/0 fd -1/6 cc -1)

debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Connection to <gitlab_ip> closed by remote host.
Transferred: sent 734404, received 3544 bytes, in 5.6 seconds
Bytes per second: sent 130904.4, received 631.7
debug1: Exit status -1
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly