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

送分小仙女□ 提交于 2019-12-19 02:09:42

问题


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 git@gitlab.com: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 git@gitlab.com 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?


回答1:


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




回答2:


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




回答3:


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.




回答4:


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.




回答5:


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.



来源:https://stackoverflow.com/questions/28700988/strange-error-in-gitlab-fatal-protocol-error-bad-line-length-character-depl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!