0

I have recently been working with Git in PyCharm.
But when I test the Git URL, it gives me this error:

fatal: protocol error: bad line length character: Pa

The remote repository in on an internal server access through a dedicated account:

anAccount@ourServer:ourRepo
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • What versions of software are you using? What URL did you test? You should add enough specific detail so that someone can reproduce the problem. – David M Dec 07 '19 at 01:02
  • Basically I put debian linux on a Lego Mindstorms EV3 brick and connected it to the internet. I then made a git repo on it, and for the first day it worked but then I kept getting the error in my original post. [link to the linux distro](https://www.ev3dev.org/) – Russell Hynes Dec 07 '19 at 01:17
  • Does this answer your question? [Git Remote: Error: fatal: protocol error: bad line length character: Unab](https://stackoverflow.com/questions/8170436/git-remote-error-fatal-protocol-error-bad-line-length-character-unab) – phd Dec 07 '19 at 11:50
  • https://stackoverflow.com/search?q=%5Bgit%5D+fatal%3A+protocol+error%3A+bad+line+length+character – phd Dec 07 '19 at 11:50
  • None of these resources helped me – Russell Hynes Dec 07 '19 at 14:45

1 Answers1

-1

Check first if switching protocol helps:

  • if the Git URL is https://github.com/..., switch to ssh://git@github.com/...
  • if the Git URL is git@github.com:..., switch to https://github.com/...

For an SSH URL, try at least to:

  • generate, for testing, a PEM ssh key, without passphrase
  • register the public key in yourUser@yourRemoteServer:~/.ssh/authorized_keys (make sure to copy the public key content id_rsa.pub as one line in that authorized_keys files)
  • make sure to use OpenSSH, not Plink.exe

That is:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\cmd;%GH%\mingw64\bin;%PATH%

ssh-keygen -m PEM -t rsa -P "" 
# Copy the %USERPROFILE%\.ssh\id_rsa.pub content to the remote server
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250