Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot clone with built-in SSH server on Windows #18528

Closed
doggy8088 opened this issue Feb 1, 2022 · 3 comments
Closed

Cannot clone with built-in SSH server on Windows #18528

doggy8088 opened this issue Feb 1, 2022 · 3 comments
Labels
issue/duplicate The issue has already been reported. issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@doggy8088
Copy link
Contributor

doggy8088 commented Feb 1, 2022

Gitea Version

1.16.0

Git Version

git version 2.35.1.windows.1

Operating System

Microsoft Windows [Version 10.0.19041.1466]

How are you running Gitea?

I'm running from command-line using Windows Service.

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/doggy8088/b7cd4708419f77a2988562f995a2cc6c

2022/02/02 00:41:52 modules/ssh/ssh.go:260:sshConnectionFailed() [W] Failed connection from [::1]:50383 with error: [ssh: no auth passed yet]
2022/02/02 00:41:52 modules/ssh/ssh.go:262:sshConnectionFailed() [W] Failed authentication attempt from [::1]:50383

Description

In my client (localhost), I do generate an key-pair. I also setup in Gitea here: https://gitea.localhost/user/settings/keys . I still can't clone using SSH protocol.

PS C:\Projects> git clone git@localhost:will.huang/aaa.git
Cloning into 'aaa'...
git@localhost: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Use HTTPS is fine.

Screenshots

image

image

image

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2022

I bet this is a duplicate of #17798

Are you using an RSA key with a very modern version of ssh?

@zeripath zeripath added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Feb 1, 2022
@doggy8088
Copy link
Contributor Author

doggy8088 commented Feb 2, 2022

@zeripath
Yes, I'm using RSA key. Simply using ssh-keygen to generate a new key-pair locally. I'm using Windows built-in OpenSSH. I'm not sure it's very modern version or not?

C:\>ssh -V
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

I confirmed the workaround works.

Add a new file ~/.ssh/config with the following content:

Host localhost
  HostkeyAlgorithms +ssh-rsa
  PubkeyAcceptedKeyTypes +ssh-rsa

@zeripath zeripath added the issue/duplicate The issue has already been reported. label Feb 2, 2022
@zeripath
Copy link
Contributor

zeripath commented Feb 2, 2022

Duplicate #17798

@zeripath zeripath closed this as completed Feb 2, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

2 participants