ssh broke #1824

Closed
opened 2025-11-02 04:14:23 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @UtechtDustin on GitHub (May 25, 2018).

After install gitea i saw that the ssh login broke with the error message

TY allocation request failed on channel 0
Hi there, You've successfully authenticated, but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
Connection to dustin-utecht.de closed.

So i found that gittea should run with a other user then root.

How i can fix it that i can login with (root) ssh again ?
What should i expect when i run gitea with a other user, that nothing brakes ?

Originally created by @UtechtDustin on GitHub (May 25, 2018). After install gitea i saw that the ssh login broke with the error message > TY allocation request failed on channel 0 > Hi there, You've successfully authenticated, but Gitea does not provide shell access. > If this is unexpected, please log in with password and setup Gitea under another user. > Connection to dustin-utecht.de closed. So i found that gittea should run with a other user then root. How i can fix it that i can login with (root) ssh again ? What should i expect when i run gitea with a other user, that nothing brakes ?
GiteaMirror added the type/question label 2025-11-02 04:14:23 -06:00
Author
Owner

@lafriks commented on GitHub (May 27, 2018):

you must not use root user. It is recommended to create separate user for ex. git

@lafriks commented on GitHub (May 27, 2018): you must not use root user. It is recommended to create separate user for ex. `git`
Author
Owner

@hamaluik commented on GitHub (May 27, 2018):

I foolishly installed gitea under my normal user account (not root), but it still broke ssh. Now all I can do is log in under a root account. How do I revert this silly behaviour?

@hamaluik commented on GitHub (May 27, 2018): I foolishly installed gitea under my normal user account (not root), but it still broke ssh. Now all I can do is log in under a root account. How do I revert this silly behaviour?
Author
Owner

@daviian commented on GitHub (May 27, 2018):

You've to undo the changes under ~/.ssh/authorized_keys, such that all gitea related stuff is removed and your original ssh public key is in there.

@daviian commented on GitHub (May 27, 2018): You've to undo the changes under ~/.ssh/authorized_keys, such that all gitea related stuff is removed and your original ssh public key is in there.
Author
Owner

@hamaluik commented on GitHub (May 27, 2018):

Worked for me.. thanks!

@hamaluik commented on GitHub (May 27, 2018): Worked for me.. thanks!
Author
Owner

@UtechtDustin commented on GitHub (May 28, 2018):

@daviian
After i remove the stuff from authorized_keys, can i run gittea with a other user without permission issues ?

@UtechtDustin commented on GitHub (May 28, 2018): @daviian After i remove the stuff from authorized_keys, can i run gittea with a other user without permission issues ?
Author
Owner

@daviian commented on GitHub (May 28, 2018):

@Falseee
Yes that's possible. After switching user you should go to the admin panel in gitea and start the rewrite authorized_keys file job.

@daviian commented on GitHub (May 28, 2018): @Falseee Yes that's possible. After switching user you should go to the admin panel in gitea and start the rewrite authorized_keys file job.
Author
Owner

@lafriks commented on GitHub (May 28, 2018):

Also you need to do chown -R git:git /path/to/git/repositories

@lafriks commented on GitHub (May 28, 2018): Also you need to do `chown -R git:git /path/to/git/repositories`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1824