First, make sure your server can access the Internet or a WebHook address, for example. use curl to query your webhook URL.
If the curl request is successful, try running GitLab to send the WebHook request with the Test button. If there is nothing wrong, the message "Hook completed successfully: HTTP 200" will appear. If there is any error, a notification appears with error data.
After you call the hook using a push event, you can search the GitLab log (in production.log if your environment is production), for example WebHook Error => Failed to open TCP connection to 192.168.1.1:80 (No route to host - connect(2) for "192.168.1.1" port 80) .
If the curl request failed, try to find out what happened to your network. After fixing the error, GitLab WebHook requests should be sent successfully.
Senorsen
source share