4

I've installed the recent version of GitLab on Ubuntu 14.04 and it works fine except pushing to the remote.

Running ssh [email protected] "git-receive-pack repo.git" works well. In ~/gitlab-shell/gitlab-shell.log, result is

INFO -- : gitlab-shell: executing git command git-receive-pack repo.git for user with key key-1.

But when I'm running git push, the log says:

WARN -- : gitlab-shell: Attempt to execute disallowed command git receive-pack 'repo.git' by user with key key-1.

And the output is:

fatal: protocol error: bad line length character: Disa

The output of ssh [email protected] "git receive-pack repo.git" is

"Disallowed command"

So the difference between allowed and disallowed is a missing dash.

My git versions:

  • Local git version: 2.2.1 (OS X)
  • Remote git version: 1.9.1 (Ubuntu 14.04)

How can I fix that? Is there a config param?

1 Answer 1

6

I have been having the same problem, and editing ~/.gitconfig solved the problem.

Something, at some time in the past, had modified my local ~/.gitconfig file and inserted this entry:

[remote "origin"]
        receivepack = git receive-pack

I modified it to the following, and now everything works well.

[remote "origin"]
        receivepack = git-receive-pack
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.