I am trying to setup a central repository that will automatically push
to another repository when it is pushed to from my local machine. I
have been Googling this for a while now and I have tried every command
combination I could find with no luck.

The setup: I first created the central repository as a bare and then
cloned it to the second machine as a non-bare. I added the second
machine as a remote, called "dev", to the first machine. I confirmed
that I could execute "git push dev devel" manually from the first
machine and it will update the second via SSH. I then cloned the
repository to my local development machine via HTTP. I can push from
the local machine to central just fine but it wil not go any further
from there.

I am trying to get this setup working using a post_receive hook which
checks what branch was pushed and then chooses the appropriate remote
for that branch (I will post the hook when I get home from work in a
little bit). The hook works as expected when ran from the central
server but I get permission denied error when the hook is actually
executed from Git. I have verified that both the users apache and git
have full access to the repo via an ACL I have even tried setting
SELinux to "permissive" mode with no luck (I am running CentOS 5.6).

This is the result of running "git push" on my local machine:
$ git push
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 332 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Pushing "dev" to "devel"...
remote: ssh: connect to host port 22: Permission denied
remote: fatal: The remote end hung up unexpectedly
To https://n...@git.nnn.nnn/site.git
   29d504c..f14f201  master -> master

Does anyone have any pointers on making this work correctly?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to