我已經在路由後面設置了我的gitlab服務器,並且已將我的ssh端口映射到服務器中的50000。 gitlab端口是50001.然後我創建一個測試項目並嘗試在另一臺機器上克隆它,當我使用http時可以。gitlab 5.2可以通過http進行克隆和推送,但無法通過ssh克隆或推送
git remote add origin http://myrouteaddress:50001/user/test.git
但是當我嘗試測試它使用ssh,它
git remote add origin ssh://[email protected]:50000/user/test.git
fatal: The remote end hung up unexpectedly
失敗我測試我的ssh設置與
ssh -vT [email protected] -p 50000
,並通過沒有問題。
我發現與
sudo tail -f /var/log/auth.log
的權威性,並得到遵循
Jun 1 12:29:22 debian sshd[24799]: Accepted publickey for git from mytestpcip port 37848 ssh2
Jun 1 12:29:22 debian sshd[24799]: pam_unix(sshd:session): session opened for user git by (uid=0)
Jun 1 12:29:22 debian sshd[24801]: Received disconnect from mytestpcip: 11: disconnected by user
Jun 1 12:29:22 debian sshd[24799]: pam_unix(sshd:session): session closed for user git
有人可以告訴我原因嗎?非常感謝你!
我檢查我的配置文件,它通過了所有與綠色或OK.I已經寫我的'的〜/ .ssh/config'文件,主機名和port.I發現我能的SSH到現在的遠程主機。 ssh myrouteaddress -p 50000 -l git PTY分配請求在通道0上失敗 歡迎使用GitLab,Anonymous! 連接到myrouteaddress關閉。 – yeluolei
@yeluolei so'ssh -Tv gitolite:user/test.git'在您的〜/ .ssh/config設置正確時不起作用? – VonC