3

When I run git push or pull, I get the error

fatal: protocol error: bad line length character: No s

My environment is:

Windows 7 pro

Visual Studio 2012

git bash

This is a repo that i've used several times before (although not for about a month). I also am the owner, and it's a private repo.

I've found this question asked here

But that is not the same problem. I didn't ever have any key problems, and I've had this repo for almost a year.

I also found an answer here, but the repo is definitely not mispelled. I've found that answer several places, and I can guarantee you that it's not mispelled in any way.

Another answer I've found is this, and they say that it's an access problem. Once again, I've had this repo around a year, and I'm also the admin over gitlab, so I'd know if something had changed. I'm still the owner of the repo, but just to make sure, I moved myself to developer, then back to owner/manager, and nothing seemed to work.

As some extra info, I've checked all of the server logs, and there appear to be no errors when this is happening, so I'm guessing it's a local problem.

Any ideas?

EDIT

This question is definitely not a duplicate of this

The reason is that even though the error messages are similar, and the answer could provide more information on how to fix the problem, it doesn't actually solve the problem.

When I run

ssh gituser@gitlab.mycompany.com git-receive-pack namespace/project.git

The output received is

008818ad46342298ddf8w87er7sdf769we7r76sd refs/heads/master report-status delete-refs side-band-64k quiet ofs-delta agent=git/2.0.5

00514daa7afb0982347928374sdf987asfd refs/tags/archive/branchName

004865987sdf987asdf98a7sf98as7f97 refs/tags/release/v1.2.0.2
0048345f9s9df87asd9f8as79df879s8d refs/tags/release/v1.2.0.4
0048c7fd22015s9df87as9df89sadf87d refs/tags/release/v1.2.0.6
0000

after the 0000 at the end, it's just stalled, blinking underscore.

According to the possible duplicate link, that command should output an error message that starts with "No s", but it doesn't.

Community
  • 1
  • 1
trueCamelType
  • 2,198
  • 5
  • 39
  • 76
  • 1
    @simmons Looks like you guys are working together, but other SO reviewers might feel confused and reject your edit. Might be better to put it as a reply to the question. : ) – rlb.usa Jun 15 '15 at 22:10
  • haha, my bad, still fairly new to SO. We are working together, and I'll start doing comments instead. – Simmons Jun 15 '15 at 22:17
  • possible duplicate of [Git Remote: Error: fatal: protocol error: bad line length character: Unab](http://stackoverflow.com/questions/8170436/git-remote-error-fatal-protocol-error-bad-line-length-character-unab) – Edward Thomson Jun 16 '15 at 00:41
  • @trueCamelType did you find an answer to this issue ? I'm having the same issue & the same output from ssh ..... git-receive-pack namespace/project.git – emonik Jan 06 '16 at 16:29
  • Sorry, I should have updated what fixed it when I did it. I forgot to update it here, and I don't remember what the fix was. I think I might have just blown away my local repo, and cloned again. Sorry again, I have failed the SO community. – trueCamelType Jan 07 '16 at 16:44
  • Just wanted to point out that in my case of this error when pulling from the server, all I did was re-connect the git extensions with the private key file (.ppk). But perhaps in my case the error occurred because of such a connection issue in the first place... Happy coding! :) – TheCuBeMan Aug 29 '16 at 09:18

1 Answers1

1

I use GitLab. In may case an error 'No s' (No such project) occured when I had renamed the project name and project path in GitLab, but forget to do this on my local machine.

So for me the solution was to set a new remote url:

git remote set-url origin git@gitlab.myserver.ru:new-project-name.git
Sergey Onishchenko
  • 6,943
  • 4
  • 44
  • 51