Gitea: ssh broke

Created on 25 May 2018  路  7Comments  路  Source: go-gitea/gitea

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 ?

kinquestion

All 7 comments

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

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?

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.

Worked for me.. thanks!

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

@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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kifirkin picture kifirkin  路  3Comments

internalfx picture internalfx  路  3Comments

Fastidious picture Fastidious  路  3Comments

cookiengineer picture cookiengineer  路  3Comments

mirhec picture mirhec  路  3Comments