gitea: Cannot clone via Gitea Internal SSH Server
- Gitea version (or commit ref): 1.10.2 / binary installation
- Git version: 2.8.4-1.el7.centos
- Operating system: CentOS 7
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
2020/01/10 16:03:34 routers/init.go:39:checkRunMode() [I] Run Mode: Production
2020/01/10 16:03:34 routers/init.go:117:GlobalInit() [I] SSH server started on scm.example.com:2222. Cipher list ([aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com arcfour256 arcfour128]), key exchange algorithms ([diffie-hellman-group1-sha1 diffie-hellman-group14-sha1 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 curve25519-sha256@libssh.org]), MACs ([hmac-sha2-256-etm@openssh.com hmac-sha2-256 hmac-sha1 hmac-sha1-96])
2020/01/10 16:03:35 cmd/web.go:151:runWeb() [I] Listen: http://0.0.0.0:3000
2020/01/10 16:03:35 ...ce/gracehttp/http.go:142:Serve() [I] Serving [::]:3000 with pid 12188
Description
Can’t clone repo via build-in SSH Server.
Config:
RUN_USER = gitea
RUN_MODE = prod
[server]
DOMAIN = scm.example.com
HTTP_PORT = 3000
ROOT_URL = http://scm.example.com:3000/
DISABLE_SSH = false
START_SSH_SERVER = true
SSH_DOMAIN = scm.example.com
SSH_PORT = 2222
SSH_LISTEN_HOST = scm.example.com
SSH_LISTEN_PORT = 2222
With there settings i can run from Windows Git Bash
$ ssh gitea@scm.example.com -p 2222
agent key RSA SHA256:Wh2+Pn5JhKGXlV8UsMmnG6NIY37LcpgH+NDwTpGpDoc returned incorrect signature type
PTY allocation request failed on channel 0
Hi there, user.name! You've successfully authenticated with the key named user.name@example.com , but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
Connection to scm.example.com closed.
I can clone repository via HTTP, but when i run git clone ssh://gitea@scm.example.com:2222/repo/path.git via SSH, it’s freezing. I added my ssh pub_key to Gitea user and i suppose if Gitea answer with the message " Hi there, user.name! You’ve successfully authenticated… but Gitea does not provide shell access" it can get/read this pub_key from sqllite db. But it’s not workung for cloning.
There is no FW on this test CentOS instance, i tested to turn off SELinux, no effect.
# lsof -i -P | grep gitea
gitea 12188 gitea 12u IPv4 130554 0t0 TCP scm.example.com:2222 (LISTEN)
gitea 12188 gitea 13u IPv6 130559 0t0 TCP *:3000 (LISTEN)
What am i missing?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
Listening on port 2222, so makes sense there is an error when you try to clone on port 22