{"id":13581450,"url":"https://github.com/stakater/GitWebhookProxy","last_synced_at":"2025-04-06T10:32:30.876Z","repository":{"id":31960366,"uuid":"127013306","full_name":"stakater/GitWebhookProxy","owner":"stakater","description":"A proxy to let webhooks reach running services behind a firewall – [✩Star] if you're using it!","archived":false,"fork":false,"pushed_at":"2025-04-03T03:37:11.000Z","size":2794,"stargazers_count":188,"open_issues_count":19,"forks_count":52,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T04:27:25.013Z","etag":null,"topics":["firewall","githook","github","gitlab","gitops","hacktoberfest","jenkins","jenkins-proxy","k8s","kubernetes","openshift","proxy","webhook"],"latest_commit_sha":null,"homepage":"https://stakater.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stakater.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-27T16:09:05.000Z","updated_at":"2025-01-08T21:29:47.000Z","dependencies_parsed_at":"2023-02-10T14:15:50.946Z","dependency_job_id":"d98e7c8a-8131-4e81-8b29-e653667ab37f","html_url":"https://github.com/stakater/GitWebhookProxy","commit_stats":null,"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakater%2FGitWebhookProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakater%2FGitWebhookProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakater%2FGitWebhookProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stakater%2FGitWebhookProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stakater","download_url":"https://codeload.github.com/stakater/GitWebhookProxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470351,"owners_count":20944146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firewall","githook","github","gitlab","gitops","hacktoberfest","jenkins","jenkins-proxy","k8s","kubernetes","openshift","proxy","webhook"],"created_at":"2024-08-01T15:02:02.201Z","updated_at":"2025-04-06T10:32:30.002Z","avatar_url":"https://github.com/stakater.png","language":"Go","funding_links":[],"categories":["Related Software","Go","proxy"],"sub_categories":["[Jenkins](#jenkins)"],"readme":"# ![](assets/web/gitwebhookproxy-round-100px.png)  GitWebhookProxy\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/stakater/GitWebhookProxy?style=flat-square)](https://goreportcard.com/report/github.com/stakater/GitWebhookProxy)\n[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/stakater/GitWebhookProxy)\n[![Release](https://img.shields.io/github/release/stakater/GitWebhookProxy.svg?style=flat-square)](https://github.com/stakater/GitWebhookProxy/releases/latest)\n[![GitHub tag](https://img.shields.io/github/tag/stakater/GitWebhookProxy.svg?style=flat-square)](https://github.com/stakater/GitWebhookProxy/releases/latest)\n[![Docker Pulls](https://img.shields.io/docker/pulls/stakater/gitwebhookproxy.svg?style=flat-square)](https://hub.docker.com/r/stakater/GitWebhookProxy/)\n[![Docker Stars](https://img.shields.io/docker/stars/stakater/gitwebhookproxy.svg?style=flat-square)](https://hub.docker.com/r/stakater/GitWebhookProxy/)\n[![MicroBadger Size](https://img.shields.io/microbadger/image-size/jumanjiman/puppet.svg?style=flat-square)](https://microbadger.com/images/stakater/GitWebhookProxy)\n[![MicroBadger Layers](https://img.shields.io/microbadger/layers/_/httpd.svg?style=flat-square)](https://microbadger.com/images/stakater/GitWebhookProxy)\n[![license](https://img.shields.io/github/license/stakater/GitWebhookProxy.svg?style=flat-square)](LICENSE)\n\nA proxy to let webhooks to reach a Jenkins instance running behind a firewall\n\n## PROBLEM\n\nJenkins is awesome and matchless tool for both CI \u0026 CD; but unfortunately its a gold mine if left in wild with wide open access; so, we always want to put it behind a firewall. But when we put it behind firewall then webhooks don't work anymore and no one wants the pull based polling but rather prefer the build to start as soon as there is a commit!\n\n## SOLUTION\n\nThis little proxy makes webhooks start working again!\n\n### Supported Providers\n\nCurrently we support the following git providers out of the box:\n\n* Github\n* Gitlab\n\n### Configuration\n\nGitWebhookProxy can be configured by providing the following arguments either via command line or via environment variables:\n\n| Parameter     | Description                                                                       | Default  | Example                                    |\n|---------------|-----------------------------------------------------------------------------------|----------|--------------------------------------------|\n| listenAddress | Address on which the proxy listens.                                               | `:8080`  | `127.0.0.1:80`                             |\n| upstreamURL   | URL to which the proxy requests will be forwarded (required)                      |          | `https://someci-instance-url.com/webhook/` |\n| secret        | Secret of the Webhook API. If not set validation is not made.                     |          | `iamasecret`                               |\n| provider      | Git Provider which generates the Webhook                                          | `github` | `github` or `gitlab`                       |\n| allowedPaths  | Comma-Separated String List of allowed paths on the proxy                         |          | `/project` or `github-webhook/,project/`   |\n| ignoredUsers  | Comma-Separated String List of users to ignore while proxying Webhook request     |          | `someuser`                                 |\n| allowedUsers  | Comma-Separated String List of users to allow while proxying Webhook request      |          | `someuser`                                 |\n\n## DEPLOYING TO KUBERNETES\n\nThe GitWebhookProxy can be deployed with vanilla manifests or Helm Charts.\n\n### Vanilla Manifests\n\nFor Vanilla manifests, you can either first clone the respository or download the `deployments/kubernetes/gitwebhookproxy.yaml` file only.\n\n#### Configuring\n\nBelow mentioned attributes in `gitwebhookproxy.yaml` have been hard coded to run in our cluster. Please make sure to update values of these according to your own configuration.\n\n1. Change below mentioned attribute's values in `Ingress` in `gitwebhookproxy.yaml`\n\n```yaml\n rules:\n  - host: gitwebhookproxy.example.com\n```\n\n```yaml\n  tls:\n  - hosts:\n    - gitwebhookproxy.example.com\n```\n\n2. Change below mentioned attribute's values in `Secret` in `gitwebhookproxy.yaml`\n\n```yaml\ndata:\n  secret: example\n```\n\n3. Change below mentioned attribute's values in `ConfigMap` in `gitwebhookproxy.yaml`\n\n```yaml\ndata:\n  provider: github\n  upstreamURL: https://jenkins.example.com\n  allowedPaths: /github-webhook,/project\n  ignoredUsers: stakater-user\n```\n\n#### Deploying\n\nThen you can deploy GitwebhookProxy by running the following kubectl commands:\n\n```bash\nkubectl apply -f gitwebhookproxy.yaml -n \u003cnamespace\u003e\n```\n\n*Note:* Make sure to update the `port` in deployment.yaml as well as service.yaml if you change the default `listenAddress` port.\n\n### Helm Charts\n\nAlternatively if you have configured helm on your cluster, you can add gitwebhookproxy to helm from our public chart repository and deploy it via helm using below mentioned commands\n\n1. Add the chart repo:\n\n   i. `helm repo add stakater https://stakater.github.io/stakater-charts/`\n\n   ii. `helm repo update`\n2. Set configuration as discussed in the `Configuring` section\n\n   i. `helm fetch --untar stakater/gitwebhookproxy`\n\n   ii. Open and edit `gitwebhookproxy/values.yaml` in a text editor and update the values mentioned in `Configuring` section.\n\n3. Install the chart\n   * `helm install stakater/gitwebhookproxy -f gitwebhookproxy/values.yaml -n gitwebhookproxy`\n\n## Running outside Kubernetes\n\n### Run with Docker\n\nTo run the docker container outside of Kubernetes, you can pass the configuration as the Container Entrypoint arguments.\nThe docker image is available on docker hub. Example below:\n\n`docker run stakater/gitwebhookproxy:v0.2.63 -listen :8080 -upstreamURL google.com -provider github -secret \"test\"`\n\n### Run with Docker compose\n\nFor docker compose, the syntax is a bit different\n\n```yaml\njenkinswebhookproxy: \n    image: 'stakater/gitwebhookproxy:latest'\n    command: [\"-listen\", \":8080\", \"-secret\", \"test\", \"-upstreamURL\", \"jenkins.example.com, \"-allowedPaths\", \"/github-webhook,/ghprbhook\"]\n    restart: on-failure\n```\n\n## Troubleshooting\n### 405 Method Not Allowed with Jenkins \u0026 github plugin\nIf you get the following error when setting up webhooks for your jobs in Jenkins, make sure you have the trailing `/` in the webhook configured in Jenkins. \n```\nError Redirecting '/github-webhook' to upstream', Upstream Redirect Status: 405 Method Not Allowed\n```\n\n## Help\n\n**Got a question?**\nFile a GitHub [issue](https://github.com/stakater/GitWebhookProxy/issues), or send us an [email](mailto:stakater@gmail.com).\n\n### Talk to us on Slack\nJoin and talk to us on the #tools-gwp channel for discussing about GitWebhookProxy\n\n[![Join Slack](https://stakater.github.io/README/stakater-join-slack-btn.png)](https://slack.stakater.com/)\n[![Chat](https://stakater.github.io/README/stakater-chat-btn.png)](https://stakater-community.slack.com/messages/CAQ5A4HGD)\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/stakater/GitWebhookProxy/issues) to report any bugs or file feature requests.\n\n### Developing\n\nPRs are welcome. In general, we follow the \"fork-and-pull\" Git workflow.\n\n 1. **Fork** the repo on GitHub\n 2. **Clone** the project to your own machine\n 3. **Commit** changes to your own branch\n 4. **Push** your work back up to your fork\n 5. Submit a **Pull request** so that we can review your changes\n\nNOTE: Be sure to merge the latest from \"upstream\" before making a pull request!\n\n## Changelog\n\nView our closed [Pull Requests](https://github.com/stakater/GitWebhookProxy/pulls?q=is%3Apr+is%3Aclosed).\n\n## License\n\nApache2 © [Stakater](http://stakater.com)\n\n## About\n\n`GitWebhookProxy` is maintained by [Stakater][website]. Like it? Please let us know at \u003chello@stakater.com\u003e\n\nSee [our other projects][community]\nor contact us in case of professional services and queries on \u003chello@stakater.com\u003e\n\n  [website]: http://stakater.com/\n  [community]: https://github.com/stakater/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstakater%2FGitWebhookProxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstakater%2FGitWebhookProxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstakater%2FGitWebhookProxy/lists"}