Gitlab 5.2 can clone and click on http, but cannot clone or click ssh

I installed my gitlab server per route and I mapped my ssh port to 50,000 on the server. gitlab port is 50001. Then I create a test project and try to clone it on another machine, this is normal when I use http.

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

but when i try to check it use ssh it is not with

 git remote add origin ssh:// git@myrouteaddress :50000/user/test.git fatal: The remote end hung up unexpectedly 

I have a test ssh setup using

 ssh -vT git@myrouteaddress -p 50000 

and he passed without problems.

I recognize auth with

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

and get the following

 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!

+4
source share
2 answers

I finally got the reason, I created the ssh rsa key with the wrong parameter. the right way:

 ssh-keygen -t rsa -C " email@email.com " 
+2
source

Check configuration:

 # check gitlab-shell install sudo -u git -H /home/git/gitlab-shell/bin/check # check gitlab install sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production 

Then try using scp syntax:

 git@myrouteaddress :50000:user/test.git or gitolite:user/test.git 

With configuration file in ~/.ssh/config with

 Host gitolite Hostname myrootaddress # or ip address Port 5000 User git IdentityFile ~/.ssh/git 
0
source

Source: https://habr.com/ru/post/1483912/


All Articles