gitosis 配置错误。我被锁定在服务器之外

gitosis 配置错误。我被锁定在服务器之外

我犯了一个愚蠢的错误。我有一个小型虚拟主机 CentOS 服务器,我正在配置 git+gitosis,当时我认为除了 git 用户之外,我还在自己的用户上运行了 gitosis ssh key init。我当时没有意识到这一点,但现在当我尝试使用我的用户 ssh 连接到服务器时,我得到了:

TY allocation request failed on channel 0
ERROR:gitosis.serve.main:Need SSH_ORIGINAL_COMMAND in environment.
Connection to [servernamehere] closed.

知道如何再次登录服务器吗?不幸的是,我已禁用 ssh root 登录。谢谢!

更完整的日志(相关部分):

debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug2: channel 0: request shell confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 100 id 0
PTY allocation request failed on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
debug2: channel 0: rcvd ext data 67
ERROR:gitosis.serve.main:Need SSH_ORIGINAL_COMMAND in environment.
debug2: channel 0: written 67 to efd 7
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: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cfd -1)
debug3: channel 0: close_fds r -1 w -1 e 7 c -1
Connection to myserver closed.

答案1

抱歉,克里斯蒂安,对此没有简单的答案,您的用户只能与 git 交互。

相关内容