Git push results in fatal: protocol error: bad line length character: This

后端 未结 21 837
春和景丽
春和景丽 2020-11-28 10:56

I am trying to get GitLab working on my server (running CentOS 6.5). I followed the gitlab-receipe to the line, but I just can\'t get it working. I am able to access the web

相关标签:
21条回答
  • 2020-11-28 11:39

    In my case, my username was changed and this repository's git config was not updated to match the new name.

    Check your git remotes to make sure they are pointing to correct place:

    git remote -v

    Update the config by editing the config manually:

    vim .git/config

    or through commands

    git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

    0 讨论(0)
  • 2020-11-28 11:39

    Adding my experience to this already long list of possible solutions.

    In my case I had the access to the repo I cloned, but no access to some other internal repos the package.json was referring to as dependencies or devDependencies. So the solution was getting access to these repos as well.

    0 讨论(0)
  • 2020-11-28 11:39

    Had the same issue, in my case the origin repo had been moved, changing .git/config solved my problem.

    0 讨论(0)
  • 2020-11-28 11:39

    When I wanted to push my commits, I got this error:

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

    I solved this just by a ssh connection check:

    ssh Git@hostIp
    
    0 讨论(0)
  • 2020-11-28 11:40

    I had this same issue and turned out that I was working on a git branch. All I needed to do was push to the master.

    $ git push <remote> <local branch name>:<remote branch to push into>
    
    0 讨论(0)
  • 2020-11-28 11:43

    The solution to my issue with this was that I'd forgotten to add in a deploy key for the project (for the user I was trying to deploy as).

    Adding a deploy key in https://gitlab/group/project/deploy_keys sorted me out.

    0 讨论(0)
提交回复
热议问题