Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
518 views
in Technique[技术] by (71.8m points)

gitlab 5.2 can clone and push by http, but can't clone or push by ssh

I have setup my gitlab server behind a route, and I have mapped my ssh port to 50000 in the server. the gitlab port is 50001.Then I create a test project and try to clone it in another machine,it's ok when I use http.

git remote add origin http://myrouteaddress:50001/user/test.git

but when I try to test it use ssh, it failed with

git remote add origin ssh://git@myrouteaddress:50000/user/test.git

fatal: The remote end hung up unexpectedly

I have test my ssh setting with

ssh -vT git@myrouteaddress -p 50000

and it passed without problem.

I find out the auth with

sudo tail -f /var/log/auth.log

and get the follow

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

can someone tell me the reason? Thank you very much!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...