bad line length character Error when no SSH key #4808

Closed
opened 2025-11-02 06:03:30 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @antonio-fr on GitHub (Feb 7, 2020).

On gitea master branch (commit 11995bf2ee).
When a the user has no SSH key registered. The ssh access tells fatal: protocol error: bad line length character: git@
How can we change the effect to be more user friendly about this error message?

Originally created by @antonio-fr on GitHub (Feb 7, 2020). On gitea master branch (commit 11995bf2ee2572995e7bc17b2b889ae33474f36c). When a the user has no SSH key registered. The ssh access tells `fatal: protocol error: bad line length character: git@` How can we change the effect to be more user friendly about this error message?
GiteaMirror added the type/questionissue/stale labels 2025-11-02 06:03:30 -06:00
Author
Owner

@stale[bot] commented on GitHub (Apr 7, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Apr 7, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@zeripath commented on GitHub (Apr 7, 2020):

Oh sorry I think we missed this one.

I'm not completely clear how you're receiving this error. Could you give me a longer explanation of how to reproduce this?

@zeripath commented on GitHub (Apr 7, 2020): Oh sorry I think we missed this one. I'm not completely clear how you're receiving this error. Could you give me a longer explanation of how to reproduce this?
Author
Owner

@antonio-fr commented on GitHub (Apr 9, 2020):

Thanks. First of all, I'm not sure this is an issue with Gitea. This might be at the sshd or git side. This is more a support question.

The issue is when using gitea in a Linux sshd server. Users auth themself using git@server using SSH protocol. When a user auth, using an agent and a git desktop client, with an unknown or invalid key (a SSH key which is not corresponding to any gitea users), the server responds with the following error message : fatal: protocol error: bad line length character: git@.
I'd like to know, if one got any idea, what is wrong with my server config. Because this message is not explicit at all, and I expect some message like 'wrong user key" or "unknown user".

@antonio-fr commented on GitHub (Apr 9, 2020): Thanks. First of all, I'm not sure this is an issue with Gitea. This might be at the sshd or git side. This is more a support question. The issue is when using gitea in a Linux sshd server. Users auth themself using git@server using SSH protocol. When a user auth, using an agent and a git desktop client, with an unknown or invalid key (a SSH key which is not corresponding to any gitea users), the server responds with the following error message : `fatal: protocol error: bad line length character: git@.` I'd like to know, if one got any idea, what is wrong with my server config. Because this message is not explicit at all, and I expect some message like 'wrong user key" or "unknown user".
Author
Owner

@stale[bot] commented on GitHub (Jun 9, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 9, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Jun 23, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Jun 23, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4808