You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use bitbucket webhook, so I add bitbucket bearer_token in .secrets.toml, just as the document (I don't know why there is pr_agent/settings/.secrets.toml in the .dockerignore):
[bitbucket_server]
# For Bitbucket Server bearer token
bearer_token = "my-bearer_token"
webhook_secret = ""
...
[deepseek]
key = "my-deepseek-key"
Then I run this command to build docker image: docker build . -t codiumai/pr-agent:bitbucket_server_webhook --target bitbucket_server_webhook -f docker/Dockerfile
I didn't push this docker image, I run it locally:
docker run -d -p 8080:3000 image-id
Then I create the webhook in bitbucket:
The test connection is always error.
I check the response detail, error message is:
Unable to connect to the URL specified within the timeout, please check the host and port are correct and that the URL is accessible from the server running this request.
Could you please help me solve this problem? I would appreciate it if you can help me! Others, I think there are too few tutorials about bitbucket webhook.
The text was updated successfully, but these errors were encountered:
It looks like you're having trouble setting up the Bitbucket Server webhook for PR-Agent. Here are some troubleshooting steps:
Docker Network Issue: The most likely problem is that your Bitbucket Server cannot reach your locally running Docker container. When you run Docker with -p 8080:3000, you're mapping port 3000 inside the container to port 8080 on your host machine, but this is only accessible from your local network.
Solution Options:
Use a tunnel service: Set up ngrok or a similar service to expose your local port to the internet: ngrok http 8080
Deploy to a publicly accessible server: Instead of running locally, deploy the Docker container to a server that Bitbucket can reach
Check firewall settings: Ensure your firewall allows incoming connections on port 8080
Webhook URL: Make sure your webhook URL is using the public address (not localhost), such as the ngrok URL or your server's public IP/domain
Configuration Check:
Your configuration in .secrets.toml looks correct
The .dockerignore file does include pr_agent/settings/.secrets.toml but your approach of creating a new .secrets.toml file is correct
Try setting up a tunnel with ngrok and use that URL in your Bitbucket webhook configuration, then test the connection again.
I've changed 'localhost' to my ip-address in url, now when I test connection, it does not fail, but returns 500, response body is:
Internal Server Error
Maybe my steps still have some problems? I'd appreciate it if you can help me!
Git provider (optional)
Bitbucket Server
System Info (optional)
No response
Issues details
Here are my actions:
Then I run this command to build docker image:
docker build . -t codiumai/pr-agent:bitbucket_server_webhook --target bitbucket_server_webhook -f docker/Dockerfile
I didn't push this docker image, I run it locally:
docker run -d -p 8080:3000 image-id
Then I create the webhook in bitbucket:
The test connection is always error.
I check the response detail, error message is:
Unable to connect to the URL specified within the timeout, please check the host and port are correct and that the URL is accessible from the server running this request.
Could you please help me solve this problem? I would appreciate it if you can help me! Others, I think there are too few tutorials about bitbucket webhook.
The text was updated successfully, but these errors were encountered: