I'm created user "gitproxy" on the server side, added my ssh key to its authorized keys and trying to work with git daemon over ssh:
gitproxy:~$ git daemon --port=2222 --verbose
but have the error: On client side:
o:~/git$ git clone ssh://server>:2222/home/gitproxy/git
Cloning into 'git'...
ssh: connect to host <server> port 2222: Connection refused
fatal: Could not read from remote repository.
On server-side:
[18666] Ready to rumble
[18667] Connection from 192.168.211.174:42416
fatal: protocol error: bad line length character: SSH-
[18666] [18667] Disconnected (with error)
Repo is exists. Also I normally enter this server via SSH without a password (so, my ssh key is accepted):
$ ssh gitproxy@192.168.201.84
gitproxy@192.168.201.84:~$
Also, I can get list of branches with git-receive-pack from my desktop (client side):
$ ssh gitproxy@192.168.201.84 git-receive-pack /home/gitproxy/git
008fef8bbf80818e6b634ca56c3ef6c24e5bbdb7bf74 refs/heads/masterreport-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.16.1
0046ef8bbf80818e6b634ca56c3ef6c24e5bbdb7bf74 refs/remotes/origin/HEAD
0048ef8bbf80818e6b634ca56c3ef6c24e5bbdb7bf74 refs/remotes/origin/master
I checked all the possible fixes that are proposed on stackoverflow. But git daemon still returns the error. I'll be very grateful for any help. Thanks in advance!