could not change github_trigger's addr from localhost #910

Closed
opened 2026-02-16 10:20:55 -05:00 by yindo · 9 comments
Owner

Originally created by @cqw-acq on GitHub (Jan 2, 2026).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.2

Plugin version

1.4.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Install Dify with offical guild line, then install github_trigger, try to create a start with api.

✔️ Error log

req_id: 622a1fb2c3 PluginInvokeError: {"args":{},"error_type":"SubscriptionError","message":"Failed to create GitHub webhook: Resource not accessible by personal access token"}

Originally created by @cqw-acq on GitHub (Jan 2, 2026). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.2 ### Plugin version 1.4.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Install Dify with offical guild line, then install github_trigger, try to create a start with api. ### ✔️ Error log req_id: 622a1fb2c3 PluginInvokeError: {"args":{},"error_type":"SubscriptionError","message":"Failed to create GitHub webhook: Resource not accessible by personal access token"}
yindo added the bug label 2026-02-16 10:20:55 -05:00
yindo closed this issue 2026-02-16 10:20:55 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2026):

Hi @cqw-acq! I'm Dosu and I’m helping the dify-official-plugins team.

In Docker setups, using localhost for the github_trigger plugin's address won't work for external webhooks—GitHub can't reach services bound to localhost inside a container. The plugin doesn't provide a direct way to change this address, but you should expose your Dify instance on a public or LAN IP, or use host.docker.internal if your Docker environment supports it. Make sure your endpoint is reachable over HTTPS from GitHub's servers, not just from inside your Docker host.

For the "Resource not accessible by personal access token" error, double-check that your GitHub personal access token has the admin:repo_hook scope and that the user is an admin on the target repository. This permission is required for webhook creation to succeed. Using a PAT is currently the only supported authentication method for this integration—OAuth is not fully supported yet in Dify's backend for external plugins like github_trigger.

More details and troubleshooting steps are available in the plugin's README and related issues:

If you update your Docker network config and token scopes as described, webhook creation should work as expected.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 2, 2026): <!-- Greeting --> Hi @cqw-acq! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-official-plugins team. <!-- Answer --> In Docker setups, using localhost for the github_trigger plugin's address won't work for external webhooks—GitHub can't reach services bound to localhost inside a container. The plugin doesn't provide a direct way to change this address, but you should expose your Dify instance on a public or LAN IP, or use host.docker.internal if your Docker environment supports it. Make sure your endpoint is reachable over HTTPS from GitHub's servers, not just from inside your Docker host. For the "Resource not accessible by personal access token" error, double-check that your GitHub personal access token has the admin:repo_hook scope and that the user is an admin on the target repository. This permission is required for webhook creation to succeed. Using a PAT is currently the only supported authentication method for this integration—OAuth is not fully supported yet in Dify's backend for external plugins like github_trigger. More details and troubleshooting steps are available in the plugin's README and related issues: - [Why localhost fails in Docker and how to use host.docker.internal or LAN IP](https://github.com/langgenius/dify-official-plugins/issues/1542) - [Required GitHub token scopes and webhook setup](https://github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md#L10-L103) - [PAT scope and admin requirements](https://github.com/langgenius/dify-official-plugins/issues/1805) If you update your Docker network config and token scopes as described, webhook creation should work as expected. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3b041461-2c97-4ee2-8e42-2e4b071a8d14?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=In%20Docker%20setups%2C%20using%20localhost%20for%20the%20github_trigger%20plugin%27s%20address%20won%27t%20work%20for%20external%20webhooks%E2%80%94GitHub%20can%27t%20reach%20services%20bound%20to%20localhost%20inside%20a%20container.%20The%20plugin%20doesn%27t%20provide%20a%20direct%20way%20to%20change%20this%20address%2C%20but%20you%20should%20expose%20your%20Dify%20instance%20on%20a%20public%20or%20LAN%20IP%2C%20or%20use%20host.docker.internal%20if%20your%20Docker%20environment%20supports%20it.%20Make%20sure%20your%20endpoint%20is%20reachable%20over%20HTTPS%20from%20GitHub%27s%20servers%2C%20not%20just%20from%20inside%20your%20Docker%20host.%20%0A%0AFor%20the%20%22Resource%20not%20accessible%20by%20personal%20access%20token%22%20error%2C%20double-check%20that%20your%20GitHub%20personal%20access%20token%20has%20the%20admin%3Arepo_hook%20scope%20and%20that%20the%20user%20is%20an%20admin%20on%20the%20target%20repository.%20This%20permission%20is%20required%20for%20webhook%20creation%20to%20succeed.%20Using%20a%20PAT%20is%20currently%20the%20only%20supported%20authentication%20method%20for%20this%20integration%E2%80%94OAuth%20is%20not%20fully%20supported%20yet%20in%20Dify%27s%20backend%20for%20external%20plugins%20like%20github_trigger.%20%0A%0AMore%20details%20and%20troubleshooting%20steps%20are%20available%20in%20the%20plugin%27s%20README%20and%20related%20issues%3A%0A-%20%5BWhy%20localhost%20fails%20in%20Docker%20and%20how%20to%20use%20host.docker.internal%20or%20LAN%20IP%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1542%29%0A-%20%5BRequired%20GitHub%20token%20scopes%20and%20webhook%20setup%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md%23L10-L103%29%0A-%20%5BPAT%20scope%20and%20admin%20requirements%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1805%29%0A%0AIf%20you%20update%20your%20Docker%20network%20config%20and%20token%20scopes%20as%20described%2C%20webhook%20creation%20should%20work%20as%20expected.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2355)
Author
Owner

@cqw-acq commented on GitHub (Jan 2, 2026):

@dosu but how to change addr, plugin doesn't let me change it!

@cqw-acq commented on GitHub (Jan 2, 2026): @dosu but how to change addr, plugin doesn't let me change it!
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2026):

The github_trigger plugin doesn't have an internal setting to change the address from 'localhost'. Instead, you need to set the environment variables PLUGIN_DAEMON_URL and ENDPOINT_URL_TEMPLATE in your .env file to your host's LAN IP or a Docker-accessible address (not 'localhost'). For example:

PLUGIN_DAEMON_URL=http://192.168.x.x:3330
ENDPOINT_URL_TEMPLATE=http://192.168.x.x:3330/e/{hook_id}

Replace 192.168.x.x with your actual host IP. After updating, restart your containers. If you're on Docker Desktop, you can also try host.docker.internal as the address. Make sure the chosen IP and port are accessible from outside the container and exposed in your Docker setup. More details and examples are in this thread: How to change plugin address from localhost.

If you need help finding your host IP or configuring Docker networking, let me know your OS and setup details!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 2, 2026): <!-- Answer --> The github_trigger plugin doesn't have an internal setting to change the address from 'localhost'. Instead, you need to set the environment variables PLUGIN_DAEMON_URL and ENDPOINT_URL_TEMPLATE in your .env file to your host's LAN IP or a Docker-accessible address (not 'localhost'). For example: ``` PLUGIN_DAEMON_URL=http://192.168.x.x:3330 ENDPOINT_URL_TEMPLATE=http://192.168.x.x:3330/e/{hook_id} ``` Replace 192.168.x.x with your actual host IP. After updating, restart your containers. If you're on Docker Desktop, you can also try host.docker.internal as the address. Make sure the chosen IP and port are accessible from outside the container and exposed in your Docker setup. More details and examples are in this thread: [How to change plugin address from localhost](https://github.com/langgenius/dify-official-plugins/issues/1054#issuecomment-2952603011). If you need help finding your host IP or configuring Docker networking, let me know your OS and setup details! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e502b119-9062-4f83-be35-365a32fb9c1c?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20github_trigger%20plugin%20doesn%27t%20have%20an%20internal%20setting%20to%20change%20the%20address%20from%20%27localhost%27.%20Instead%2C%20you%20need%20to%20set%20the%20environment%20variables%20PLUGIN_DAEMON_URL%20and%20ENDPOINT_URL_TEMPLATE%20in%20your%20.env%20file%20to%20your%20host%27s%20LAN%20IP%20or%20a%20Docker-accessible%20address%20%28not%20%27localhost%27%29.%20For%20example%3A%0A%0A%60%60%60%0APLUGIN_DAEMON_URL%3Dhttp%3A//192.168.x.x%3A3330%0AENDPOINT_URL_TEMPLATE%3Dhttp%3A//192.168.x.x%3A3330/e/%7Bhook_id%7D%0A%60%60%60%0A%0AReplace%20192.168.x.x%20with%20your%20actual%20host%20IP.%20After%20updating%2C%20restart%20your%20containers.%20If%20you%27re%20on%20Docker%20Desktop%2C%20you%20can%20also%20try%20host.docker.internal%20as%20the%20address.%20Make%20sure%20the%20chosen%20IP%20and%20port%20are%20accessible%20from%20outside%20the%20container%20and%20exposed%20in%20your%20Docker%20setup.%20More%20details%20and%20examples%20are%20in%20this%20thread%3A%20%5BHow%20to%20change%20plugin%20address%20from%20localhost%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1054%23issuecomment-2952603011%29.%0A%0AIf%20you%20need%20help%20finding%20your%20host%20IP%20or%20configuring%20Docker%20networking%2C%20let%20me%20know%20your%20OS%20and%20setup%20details%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2355)
Author
Owner

@cqw-acq commented on GitHub (Jan 2, 2026):

@dosu I changed both into my domain, but it is still not working

@cqw-acq commented on GitHub (Jan 2, 2026): @dosu I changed both into my domain, but it is still not working
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2026):

If changing PLUGIN_DAEMON_URL and ENDPOINT_URL_TEMPLATE to your domain didn't work, here are the most common causes and fixes:

  1. Make sure your domain is publicly accessible over HTTPS and has a valid SSL certificate—GitHub requires this for webhook delivery (the plugin always sets insecure_ssl to "0") source.
  2. After updating those environment variables, you must restart all Dify services (including plugin daemons and NGINX) for the changes to take effect source.
  3. If webhooks work when accessing your internal port (like 5001) but not through your domain, your NGINX config is likely outdated. Update docker/nginx/conf.d/default.conf.template to the latest version from the Dify repo and restart the NGINX container. This fixes routing issues that cause webhooks to fail or return 404 via your domain source.
  4. Double-check that your GitHub personal access token has the admin:repo_hook scope and that the user is an admin on the repo—otherwise, webhook creation will fail source.

If you still have trouble, please share the exact error message or log you see after switching to your domain, and confirm whether your domain is reachable from the public internet (for example, try curl https://your-domain/e/{hook_id} from outside your network). This will help pinpoint where things are breaking.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 2, 2026): <!-- Answer --> If changing PLUGIN_DAEMON_URL and ENDPOINT_URL_TEMPLATE to your domain didn't work, here are the most common causes and fixes: 1. Make sure your domain is publicly accessible over HTTPS and has a valid SSL certificate—GitHub requires this for webhook delivery (the plugin always sets `insecure_ssl` to "0") [source](https://github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md#L5-L95). 2. After updating those environment variables, you must restart all Dify services (including plugin daemons and NGINX) for the changes to take effect [source](https://github.com/langgenius/dify/issues/15684). 3. If webhooks work when accessing your internal port (like 5001) but not through your domain, your NGINX config is likely outdated. Update `docker/nginx/conf.d/default.conf.template` to the latest version from the Dify repo and restart the NGINX container. This fixes routing issues that cause webhooks to fail or return 404 via your domain [source](https://github.com/langgenius/dify/issues/29909). 4. Double-check that your GitHub personal access token has the `admin:repo_hook` scope and that the user is an admin on the repo—otherwise, webhook creation will fail [source](https://github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md#L5-L95). If you still have trouble, please share the exact error message or log you see after switching to your domain, and confirm whether your domain is reachable from the public internet (for example, try `curl https://your-domain/e/{hook_id}` from outside your network). This will help pinpoint where things are breaking. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b5c67a76-8a58-4df4-b27c-38d88b984c74?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=If%20changing%20PLUGIN_DAEMON_URL%20and%20ENDPOINT_URL_TEMPLATE%20to%20your%20domain%20didn%27t%20work%2C%20here%20are%20the%20most%20common%20causes%20and%20fixes%3A%0A%0A1.%20Make%20sure%20your%20domain%20is%20publicly%20accessible%20over%20HTTPS%20and%20has%20a%20valid%20SSL%20certificate%E2%80%94GitHub%20requires%20this%20for%20webhook%20delivery%20%28the%20plugin%20always%20sets%20%60insecure_ssl%60%20to%20%220%22%29%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md%23L5-L95%29.%0A2.%20After%20updating%20those%20environment%20variables%2C%20you%20must%20restart%20all%20Dify%20services%20%28including%20plugin%20daemons%20and%20NGINX%29%20for%20the%20changes%20to%20take%20effect%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/15684%29.%0A3.%20If%20webhooks%20work%20when%20accessing%20your%20internal%20port%20%28like%205001%29%20but%20not%20through%20your%20domain%2C%20your%20NGINX%20config%20is%20likely%20outdated.%20Update%20%60docker/nginx/conf.d/default.conf.template%60%20to%20the%20latest%20version%20from%20the%20Dify%20repo%20and%20restart%20the%20NGINX%20container.%20This%20fixes%20routing%20issues%20that%20cause%20webhooks%20to%20fail%20or%20return%20404%20via%20your%20domain%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/issues/29909%29.%0A4.%20Double-check%20that%20your%20GitHub%20personal%20access%20token%20has%20the%20%60admin%3Arepo_hook%60%20scope%20and%20that%20the%20user%20is%20an%20admin%20on%20the%20repo%E2%80%94otherwise%2C%20webhook%20creation%20will%20fail%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md%23L5-L95%29.%0A%0AIf%20you%20still%20have%20trouble%2C%20please%20share%20the%20exact%20error%20message%20or%20log%20you%20see%20after%20switching%20to%20your%20domain%2C%20and%20confirm%20whether%20your%20domain%20is%20reachable%20from%20the%20public%20internet%20%28for%20example%2C%20try%20%60curl%20https%3A//your-domain/e/%7Bhook_id%7D%60%20from%20outside%20your%20network%29.%20This%20will%20help%20pinpoint%20where%20things%20are%20breaking.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2355)
Author
Owner

@cqw-acq commented on GitHub (Jan 2, 2026):

@dosu it says api-1 | core.plugin.impl.exc.PluginInvokeError: req_id: 6197e909d2 PluginInvokeError: {"args":{},"error_type":"SubscriptionError","message":"Failed to create GitHub webhook: Resource not accessible by personal access token"}

@cqw-acq commented on GitHub (Jan 2, 2026): @dosu it says `api-1 | core.plugin.impl.exc.PluginInvokeError: req_id: 6197e909d2 PluginInvokeError: {"args":{},"error_type":"SubscriptionError","message":"Failed to create GitHub webhook: Resource not accessible by personal access token"}`
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2026):

This error means GitHub is rejecting your personal access token (PAT) when the plugin tries to create the webhook. The most common causes are:

  • The PAT does not have the required admin:repo_hook (Repository hooks: Read & Write) scope, or the user is not an admin on the target repo. Double-check the token’s scopes and that the user is an admin on the repository you’re targeting. If you’re using a fine-grained PAT, make sure it’s granted access to the specific repo and includes the “Repository hooks” permission set to Read & Write. See plugin requirements
  • The PAT is expired, revoked, or restricted (for example, by organization SSO or third-party app restrictions). Try generating a new PAT and using it.
  • Organization-level or repo-level restrictions (like SSO, branch protection, or required app approval) can block webhook creation even with a valid PAT.
  • The GitHub user must be an admin on the repo, not just a collaborator.

Changing the plugin address to your domain is necessary for webhook delivery, but it does not affect PAT permissions. The error is coming directly from GitHub’s API and is surfaced by the plugin when the webhook creation fails. See code reference

If you’ve confirmed all the above and still get this error, try removing and re-adding the integration with a freshly generated PAT, and check for any org-level policies that might block third-party integrations.

If you want to rule out endpoint issues, you can also test your webhook endpoint’s public accessibility by running curl https://your-domain/e/{hook_id} from outside your network.

If you share your PAT scopes (redact the token itself), I can help confirm if they’re correct.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 2, 2026): <!-- Answer --> This error means GitHub is rejecting your personal access token (PAT) when the plugin tries to create the webhook. The most common causes are: - The PAT does not have the required admin:repo_hook (Repository hooks: Read & Write) scope, or the user is not an admin on the target repo. Double-check the token’s scopes and that the user is an admin on the repository you’re targeting. If you’re using a fine-grained PAT, make sure it’s granted access to the specific repo and includes the “Repository hooks” permission set to Read & Write. [See plugin requirements](https://github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md#L6-L96) - The PAT is expired, revoked, or restricted (for example, by organization SSO or third-party app restrictions). Try generating a new PAT and using it. - Organization-level or repo-level restrictions (like SSO, branch protection, or required app approval) can block webhook creation even with a valid PAT. - The GitHub user must be an admin on the repo, not just a collaborator. Changing the plugin address to your domain is necessary for webhook delivery, but it does not affect PAT permissions. The error is coming directly from GitHub’s API and is surfaced by the plugin when the webhook creation fails. [See code reference](https://github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/provider/github.py#L180-L295) If you’ve confirmed all the above and still get this error, try removing and re-adding the integration with a freshly generated PAT, and check for any org-level policies that might block third-party integrations. If you want to rule out endpoint issues, you can also test your webhook endpoint’s public accessibility by running curl https://your-domain/e/{hook_id} from outside your network. If you share your PAT scopes (redact the token itself), I can help confirm if they’re correct. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b039e276-a962-4fd9-abba-cb9215142ff2?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20error%20means%20GitHub%20is%20rejecting%20your%20personal%20access%20token%20%28PAT%29%20when%20the%20plugin%20tries%20to%20create%20the%20webhook.%20The%20most%20common%20causes%20are%3A%0A%0A-%20The%20PAT%20does%20not%20have%20the%20required%20admin%3Arepo_hook%20%28Repository%20hooks%3A%20Read%20%26%20Write%29%20scope%2C%20or%20the%20user%20is%20not%20an%20admin%20on%20the%20target%20repo.%20Double-check%20the%20token%E2%80%99s%20scopes%20and%20that%20the%20user%20is%20an%20admin%20on%20the%20repository%20you%E2%80%99re%20targeting.%20If%20you%E2%80%99re%20using%20a%20fine-grained%20PAT%2C%20make%20sure%20it%E2%80%99s%20granted%20access%20to%20the%20specific%20repo%20and%20includes%20the%20%E2%80%9CRepository%20hooks%E2%80%9D%20permission%20set%20to%20Read%20%26%20Write.%20%5BSee%20plugin%20requirements%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/README.md%23L6-L96%29%0A-%20The%20PAT%20is%20expired%2C%20revoked%2C%20or%20restricted%20%28for%20example%2C%20by%20organization%20SSO%20or%20third-party%20app%20restrictions%29.%20Try%20generating%20a%20new%20PAT%20and%20using%20it.%0A-%20Organization-level%20or%20repo-level%20restrictions%20%28like%20SSO%2C%20branch%20protection%2C%20or%20required%20app%20approval%29%20can%20block%20webhook%20creation%20even%20with%20a%20valid%20PAT.%0A-%20The%20GitHub%20user%20must%20be%20an%20admin%20on%20the%20repo%2C%20not%20just%20a%20collaborator.%0A%0AChanging%20the%20plugin%20address%20to%20your%20domain%20is%20necessary%20for%20webhook%20delivery%2C%20but%20it%20does%20not%20affect%20PAT%20permissions.%20The%20error%20is%20coming%20directly%20from%20GitHub%E2%80%99s%20API%20and%20is%20surfaced%20by%20the%20plugin%20when%20the%20webhook%20creation%20fails.%20%5BSee%20code%20reference%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/d3eb62d32100ee489a4f4e5583370547a9dfa806/triggers/github_trigger/provider/github.py%23L180-L295%29%0A%0AIf%20you%E2%80%99ve%20confirmed%20all%20the%20above%20and%20still%20get%20this%20error%2C%20try%20removing%20and%20re-adding%20the%20integration%20with%20a%20freshly%20generated%20PAT%2C%20and%20check%20for%20any%20org-level%20policies%20that%20might%20block%20third-party%20integrations.%0A%0AIf%20you%20want%20to%20rule%20out%20endpoint%20issues%2C%20you%20can%20also%20test%20your%20webhook%20endpoint%E2%80%99s%20public%20accessibility%20by%20running%20curl%20https%3A//your-domain/e/%7Bhook_id%7D%20from%20outside%20your%20network.%0A%0AIf%20you%20share%20your%20PAT%20scopes%20%28redact%20the%20token%20itself%29%2C%20I%20can%20help%20confirm%20if%20they%E2%80%99re%20correct.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2355)
Author
Owner

@cqw-acq commented on GitHub (Jan 2, 2026):

@dosu but im sure my token is correct, so the only thing is my addr, can you help me to change my addr?

@cqw-acq commented on GitHub (Jan 2, 2026): @dosu but im sure my token is correct, so the only thing is my addr, can you help me to change my addr?
Author
Owner

@dosubot[bot] commented on GitHub (Jan 2, 2026):

To change the github_trigger plugin's address from localhost to your domain, set both PLUGIN_DAEMON_URL and ENDPOINT_URL_TEMPLATE in your .env file to use your domain (not localhost), for example:

PLUGIN_DAEMON_URL=https://your-domain.com:3330
ENDPOINT_URL_TEMPLATE=https://your-domain.com:3330/e/{hook_id}

After updating these, restart all Dify-related Docker containers—including plugin daemons and NGINX—to apply the changes. If the plugin still uses localhost, double-check that the environment variables are set correctly inside the running containers and that your domain is publicly accessible over HTTPS (GitHub requires valid SSL) reference.

If you still see issues, check your NGINX config: outdated routing can cause webhook failures even if the domain is set correctly. Update docker/nginx/conf.d/default.conf.template to the latest version from the Dify repo and restart NGINX reference.

To confirm your endpoint is reachable, run curl https://your-domain.com/e/{hook_id} from outside your network. If you get a 404 or can't connect, the domain isn't routed to the plugin service correctly.

If the endpoint in the Dify UI or logs still shows localhost after all this, try removing and re-adding the plugin or integration to force the new address to be used.

Let me know if you need help checking your Docker or NGINX setup, or if you want to share your actual endpoint URL for more targeted troubleshooting.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 2, 2026): <!-- Answer --> To change the github_trigger plugin's address from localhost to your domain, set both `PLUGIN_DAEMON_URL` and `ENDPOINT_URL_TEMPLATE` in your `.env` file to use your domain (not localhost), for example: ``` PLUGIN_DAEMON_URL=https://your-domain.com:3330 ENDPOINT_URL_TEMPLATE=https://your-domain.com:3330/e/{hook_id} ``` After updating these, restart all Dify-related Docker containers—including plugin daemons and NGINX—to apply the changes. If the plugin still uses localhost, double-check that the environment variables are set correctly inside the running containers and that your domain is publicly accessible over HTTPS (GitHub requires valid SSL) [reference](https://github.com/langgenius/dify-official-plugins/issues/1054). If you still see issues, check your NGINX config: outdated routing can cause webhook failures even if the domain is set correctly. Update `docker/nginx/conf.d/default.conf.template` to the latest version from the Dify repo and restart NGINX [reference](https://github.com/langgenius/dify-official-plugins/issues/2136). To confirm your endpoint is reachable, run `curl https://your-domain.com/e/{hook_id}` from outside your network. If you get a 404 or can't connect, the domain isn't routed to the plugin service correctly. If the endpoint in the Dify UI or logs still shows localhost after all this, try removing and re-adding the plugin or integration to force the new address to be used. Let me know if you need help checking your Docker or NGINX setup, or if you want to share your actual endpoint URL for more targeted troubleshooting. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a6f48526-8387-4ef6-b6c3-d563124f7038?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=To%20change%20the%20github_trigger%20plugin%27s%20address%20from%20localhost%20to%20your%20domain%2C%20set%20both%20%60PLUGIN_DAEMON_URL%60%20and%20%60ENDPOINT_URL_TEMPLATE%60%20in%20your%20%60.env%60%20file%20to%20use%20your%20domain%20%28not%20localhost%29%2C%20for%20example%3A%0A%0A%60%60%60%0APLUGIN_DAEMON_URL%3Dhttps%3A//your-domain.com%3A3330%0AENDPOINT_URL_TEMPLATE%3Dhttps%3A//your-domain.com%3A3330/e/%7Bhook_id%7D%0A%60%60%60%0A%0AAfter%20updating%20these%2C%20restart%20all%20Dify-related%20Docker%20containers%E2%80%94including%20plugin%20daemons%20and%20NGINX%E2%80%94to%20apply%20the%20changes.%20If%20the%20plugin%20still%20uses%20localhost%2C%20double-check%20that%20the%20environment%20variables%20are%20set%20correctly%20inside%20the%20running%20containers%20and%20that%20your%20domain%20is%20publicly%20accessible%20over%20HTTPS%20%28GitHub%20requires%20valid%20SSL%29%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1054%29.%0A%0AIf%20you%20still%20see%20issues%2C%20check%20your%20NGINX%20config%3A%20outdated%20routing%20can%20cause%20webhook%20failures%20even%20if%20the%20domain%20is%20set%20correctly.%20Update%20%60docker/nginx/conf.d/default.conf.template%60%20to%20the%20latest%20version%20from%20the%20Dify%20repo%20and%20restart%20NGINX%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2136%29.%0A%0ATo%20confirm%20your%20endpoint%20is%20reachable%2C%20run%20%60curl%20https%3A//your-domain.com/e/%7Bhook_id%7D%60%20from%20outside%20your%20network.%20If%20you%20get%20a%20404%20or%20can%27t%20connect%2C%20the%20domain%20isn%27t%20routed%20to%20the%20plugin%20service%20correctly.%0A%0AIf%20the%20endpoint%20in%20the%20Dify%20UI%20or%20logs%20still%20shows%20localhost%20after%20all%20this%2C%20try%20removing%20and%20re-adding%20the%20plugin%20or%20integration%20to%20force%20the%20new%20address%20to%20be%20used.%0A%0ALet%20me%20know%20if%20you%20need%20help%20checking%20your%20Docker%20or%20NGINX%20setup%2C%20or%20if%20you%20want%20to%20share%20your%20actual%20endpoint%20URL%20for%20more%20targeted%20troubleshooting.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2355)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#910