1

I have installed Gitea on a LXC container and added my ssh key through the UI.

But when I do git clone git@240.162.0.163:theo/test-repo.git I will get the following error:

Cloning into 'test-repo'...
fatal: protocol error: bad line length character: This

How can I fix this?

Andy Lester
  • 91,102
  • 13
  • 100
  • 152
Dirk
  • 3,095
  • 4
  • 19
  • 37
  • https://stackoverflow.com/a/32645891/7976758 Found in https://stackoverflow.com/search?q=%5Bgit%5D+fatal%3A+protocol+error%3A+bad+line+length+character – phd Oct 10 '22 at 16:32
  • 1
    Start debugging with `ssh git@240.162.0.163` – phd Oct 10 '22 at 16:32

1 Answers1

0

I have seen this before whenever your remote user profile/.bashrc prints data, instead of being silent.

If, for instance, ssh git@240.162.0.163 pwd returns anything else than the path working directory on the remote machine, Git would be in trouble, as it would not interpret correctly the output of its SSH query when cloning the remote repository.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250