Search code examples
gitgithooksgit-remotegit-bare

Git cannot push to remote bare repo


What I would like to do : I would like to create a remote that points to a bare git repository on a vps server accessible through ssh. This bare repository will embed a hook to fetch the latest branch version into another directory on the same vps server.

Where I'm stuck :

  • The bare repository is created on vps server
  • The remote is created from local computer
  • The server is accessible via SSH
  • When performing "git push production master" with production being my remote name, git just stops without exiting leaving the following prompt :

enter image description here

Here is the part of my .git/config file for the remote definition

enter image description here

Whether the hook is enabled or not, it gives me the same output. Do you have any hint on what is wrong here ? I checked the remote repositories are both

  • at the correct path
  • with a correct permission set

Thank you for your time.


Solution

  • Turns out the remote bare git folder was in www-data ownership, not in the used ssh user ownership. Everything is working fine now. Regards & Sorry.