I type
git push --set-upstream ssh://[email protected]/projekt.git master
cmd returns:
[email protected]'s password: [here I type correct password]
fatal: protocol error: bad line length character: Shel
what am I doing wrong?
If you are using Godaddy hosting for example, this error could occur because your SSH access is disabled.
So the server just closes the connection immediately and GIT show us
fatal: protocol error: bad line length character: Shel.
Which means Shell access is denied/closed/etc i think.
Go to your cPanel and enable it. cPanel -> Settings -> SSH Access.
This can occur even if you have already enabled it before. They switch it off periodically.
If it's already enabled though, just disable and re-enable it.
I had this error when I was trying to reach a repo in an Apache user's directory. [In my server (CentOS 6.4), users are being created through CPanel component.]
What this error possibly means is that the user you are using doesn't have shell access, only web and FTP or other protocols.
If you have access to your web server, I will tell you how to solve it, but make sure if you can't solve it by adding a new user since apache users are the users that executes web pages, using them for shell access might cause security problems.
Open passwd
in your editor:
vim /etc/passwd
Find the line that contains your user's configuration and check the last path. It should be like this:
antyusos:x:306:307:/home/antyusos:/usr/local/cpanel/bin/noshell
What matters here is the last path, "/usr/local/cpanel/bin/noshell". Change this line to:
antyusos:x:306:307:/home/antyusos:/bin/bash
Save & exit the editor.
Hopefully, it should work. At least it did for me. But as I said, I find it dangerous and as the last option.
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With