Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange error in gitlab: fatal: protocol error: bad line length character: Depl

Tags:

git

gitlab

On one of my servers, when I'm try to pull/ls-remote fresh-created repo on gitlab, I'm getting these error:

git ls-remote [email protected]:mas-vem/dinnerdelivery.git
fatal: protocol error: bad line length character: Depl

If I'm trying to ls-remote one of earliest created repositories, all is fine.

When I'm run this command:

ssh [email protected] git-receive-pack mas-vem/dinnerdelivery.git

I'm getting this error:

Deploy key not allowed to push

But I doesn't want to push =/

What it could be? Does it is gitlab issue or error on my side?

like image 476
Drakmail Avatar asked Feb 24 '15 16:02

Drakmail


5 Answers

Found what is was problem: I just forgot to add deploy key to repo =/ After that issue was solved.

like image 113
Drakmail Avatar answered Nov 14 '22 00:11

Drakmail


Just for other users reference:

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

can be a truncated answer for "No such project".

As in my case, this kind of error can be fixed by adding user (even yourself) to the project in gitlab:

https://gitlab.com/username/your_project/project_members

also, ensure your public key is set in your user "Profile settings" > SSH Key or in Project > Settings > Deploy Keys

like image 45
Angelo Maragna Avatar answered Nov 14 '22 00:11

Angelo Maragna


fatal: protocol error: bad line length character: This

has been discussed here before. It's a common error.

I believe one of the main reasons of this happening is because of problems with the Shell access (is the access allowed?) on the server..

I would suggest to look at Git push results in fatal: protocol error: bad line length character: This, it can give you an idea on how to tackle the problem.

like image 42
Joey Dorrani Avatar answered Nov 14 '22 01:11

Joey Dorrani


To verify that your remote URL is correct use following command:

git remote -v 

Make sure your "origin" remote URL is correct, because if git is unable to connect to remote then you would see these errors.

Fix the remote using following command:

 git remote set-url <your-remote-name> <your-remote-url> 

That should fix this issue.

like image 32
Sandeep Avatar answered Nov 14 '22 00:11

Sandeep


I would like to add an aditional fix to this problem, if you are part of a Group, and you can pull the project, but get the error when you push, not having write privledges will give you this error! Make sure you are in the Group that owns the project.

like image 36
Cyberience Avatar answered Nov 13 '22 23:11

Cyberience