Page MenuHomePhabricator

Cannot push to hosted git repository (pre-receive hook declined)
Closed, InvalidPublic

Description

I am migrating from an external SVN repository to GIT, hosted by phabricator.

I created a repository in phabricator. The did a git svn clone on the SVN repo.

After cleaning up (https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git) I then set the phabricator repo as a remote:

git remote add origin http:\path\to\repo.git

And try to push to it:

git push origin --all

I get this error:

 POST git-receive-pack (38738836 bytes)
 remote: [2015-06-05 05:23:28] EXCEPTION: (CommandException) Command failed with error #127!
 remote: COMMAND
 remote: git log --format='%H' 'bb933f4a660ce3af37cd7b0bf6d6967451f1f3da' --not --all
 remote: 
 remote: STDOUT
 remote: (empty)
 remote: 
 remote: STDERR
 remote: git: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
 remote:  at [<phutil>/src/future/exec/ExecFuture.php:416]
 remote: arcanist(head=master, ref.master=eb036465dc9b), phabricator(head=master, ref.master=a81072046a28), phutil(head=master, ref.master=aaee4009e20d)
 remote:   #0 ExecFuture::resolvex() called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:573]
 remote:   #1 DiffusionCommitHookEngine::findGitContentUpdates(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:265]
 remote:   #2 DiffusionCommitHookEngine::findContentUpdates(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:141]
remote:   #3 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:131]
Pushing to http://phabricator.jbanorthwest.co.uk/diffusion/T/test.git
To http://phabricator.jbanorthwest.co.uk/diffusion/T/test.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://phabricator.jbanorthwest.co.uk/diffusion/T/test.git'

Any ideas?

Event Timeline

JamesRamm raised the priority of this task from to Needs Triage.
JamesRamm updated the task description. (Show Details)
JamesRamm added a project: Diffusion.
JamesRamm added a subscriber: JamesRamm.

git: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

Do you have that .so? Do git and php, when run as daemon-user, have it configured?

Try installing the libiconv package from here: https://www.gnu.org/software/libiconv/ and run

git push origin --all

again. Looks like libiconv is not installed on your machine.

avivey claimed this task.