If i want to syncronize my remote origin with another remote repository i will have to register a post-update hook. But I will need an ssh key for that.

Because my origin repo is owned by git user, i will need to create that ssh for that user. But i can not login as git user to create the need ssh keys (gitlab created that user and i do not know a password). Is there another approach to do that sync, or is there a general mistake in the way i want to do that?

  • You could log in as root and then su - git right?
    – mtak
    Aug 8, 2014 at 7:37

1 Answer 1


If you have root/sudo privilege you can create the key and then store in the git user's .ssh directory. Don't forget to chown the created to file so they belong to git:git and chmod them to the appropriate paranoid values.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .