Git push timeout when using post-receive-email hook

I’m using Git control version system through Eclipse (Egit plugin).

I’ve configured the post-receive-email hook to trigger an email every time I push to the remote repository. The hook is working as expected (I got a new email on every change), but I have to “push” twice.

  • EGit Local vs. Remote repositories
  • I have just created small android project in Eclipse, which files I should add to version control?
  • Ignore .classpath and .project from Git
  • Getting started with Eclipse + EGit - confused
  • Eclipse Neon eGit Integration gives Exception 401 Authorization Required
  • How to create a Git pull request from within Eclipse
  • When I make the first push, it always fails with a timeout error

     ssh://user@server/path/to/repo.git: Read timed out after 30.000 ms

    Then, with the second push, everything goes well, the remote repository is updated and I receive the email.

    So, I want to know if there is a way to fix this behaviour, if I have to add something to hook configuration, or change something in Eclipse. I dont want to push my changes twice everytime.

    Hope you can help me, thanks!!!

  • When I saved in Windows 7, git diff shows all the lines with ^M
  • GitExtensions + Putty via SSH on custom port
  • Git show all branches (but not stashes) in log
  • Updating project version number on git push
  • Using visual studio 2015, how to Commit only one file?
  • How to know if a tag is a fast foward to another in a BARE repository?
  • One Solution collect form web for “Git push timeout when using post-receive-email hook”

    Goto Windows -> Team -> Preferences -> (in the ‘type filter text’ search for -> ) GIT.

    You get the following window

    EGIT Remote Connection Timeout Configuration

    Change or increase you time so that you might not have trouble when the Push to Upstream takes time.

    This timeout issue is completely related to the EGIT configuration, you don’t have to mess with the GIT hooks.

    I hope your problem will be resolved with this my friend

    Git Baby is a git and github fan, let's start git clone.