Understanding post-receive hook


We’re using gitea 1.12.2 with teamcity 2018.x

I’m trying to setup a hook to trigger builds on our teamcity via post-receive & post-commit hooks. Attempting to follow their 2018 documentation, I’ve done the following:

  1. A post-receive hook is enabled on my repo (done so through the web gui) that contains a path to teamcity-trigger.sh and the required line for the vcs locator root
  2. Locally, I created teamcity-trigger.sh that is in .git/hooks that contains login creds and a curl that sends a POST
  3. The internal pole rate on TC was set to some number that doesn’t make TC pole against git (i think its set to some seconds in the millions)

When I test the hook by pushing a file onto my repo, my cygwin returns an error stating that:

.hooks/post-receive.d/post-receive: line1: /.git/hooks/teamcity-trigger.sh: No such file or directory

I’ve been tinkering around with it and have browsed various sites trying to find possible causes for this error, everything i’ve tried doesn’t return any success. Any ideas on where I am going wrong? (probably everywhere :wink: )