mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
could not change github_trigger's addr from localhost #910
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cqw-acq on GitHub (Jan 2, 2026).
Self Checks
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"}
@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
@cqw-acq commented on GitHub (Jan 2, 2026):
@dosu but how to change addr, plugin doesn't let me change it!
@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:
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
@cqw-acq commented on GitHub (Jan 2, 2026):
@dosu I changed both into my domain, but it is still not working
@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:
insecure_sslto "0") source.docker/nginx/conf.d/default.conf.templateto 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.admin:repo_hookscope 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
@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"}@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:
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
@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?
@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_URLandENDPOINT_URL_TEMPLATEin your.envfile to use your domain (not localhost), for example: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.templateto 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