-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self-hosted gitlab webhook with one month free got error and no any other infomation #42
Comments
./bito-cra.sh service start bito-cra.propertiesStarting the CRA... Bito Code Review Agent is running as: server hex string is too long Running command: docker pull bitoai/cra:latest |
Hi, Please refer to the self-hosted details at: Once the "./bito-cra.sh service start bito-cra.properties" is executed, you would need to configure GitLab Webhook instead of making curl calls. Are all the steps mentioned in above document are followed to configure GitLab webhook? Thanks. |
I got the curl calls info from gitlab webhook request logs, I wonder if there is some problem other than the webhook request itself. Is there some way for us to check if the self-hosted service is working well ? or some way for further infomation for the error? |
HI, Please note below points:
Please let me know if you face any issues and I will be happy to get on the call. |
I am using the code So the main problem at present is that the code is not on paid plan? But it seems like a general code and there is no information to combine the code in bito-cra.properties with my email account. And I can see that it is available on free plan. |
|
hi @rawbin- Sorry for the confusion. Please follow below steps to get a Trial -
Thanks, |
Also setting the "bito_cli.bito.access_key=1monthFREE24H4" in bito-cra.properties is not correct. Once the the workspace is on paid plan, please make sure that these 3 parameters are configured correctly in file bito-cra.properties i> git.provider=GITLAB ii> git.access_token iii> bito_cli.bito.access_key. Please refer to https://docs.bito.ai/account-and-settings/access-key for how to create Bito Access Key. If these parameters are not configured correctly then WebHook won't get expected response. |
@adhirpotdarbito @nisha-bito thank you very much for you kindness.
|
Hi @rawbin- This error comes when GITLAB webhook body JSON is not having all required parameters, i.e. in your case it is file "gitlab-webhook-mr-body.json" used in curl call with -d option. Can you please share this JSON file? Alternatively, instead of curl call, I would suggest to configure the webhook, create a new PR to trigger the code review session. Thanks. |
The request body is copied from gitlab webhook log page, It's params for gitlab webhook tests. I replace some info for sensibility reason but with full structure.
|
Thanks and we will check & get back to you. |
Hi @rawbin- We see below issue in a curl call: curl -X POST -H 'Content-Type: application/json' -H "User-Agent: GitLab/17.2.1-ee" -H "X-Gitlab-Event: Merge Request Hook" -H "X-Gitlab-Webhook-UUID: d9c303c5-9ddd-4d7c-8355-0f2f63c4fd99" -H "X-Gitlab-Token: b76c3b67ae97a3c54b35985e2c155818" -H "X-Gitlab-Event-UUID: 63ab84ed-f9a7-419a-a8d5-7eb2dd4e5e06" -d @gitlab-webhook-mr-body.json http://127.0.0.1:10051/api/v1/gitlab_webhooks X-Gitlab-Token: b76c3b67ae97a3c54b35985e2c155818 is not valid token, please use the secret provided by the bash script under the tag "Use below as Gitlab and Github Webhook secret:". Please repair and try out the curl call again. Note: We will put fix in future release such that instead of "Oops!! Something Went Wrong", we will give proper error. Thanks |
Hi @rawbin- Just following up on the previous message. Were you able to update the curl call with the correct Let us know if you need any further assistance. Thanks! |
I am exactly using the token from the staring up output。 |
Hi @rawbin- Thank you for getting back to us. Could you please check the value set in bito_cli.bito.access_key and let us know whether your Git access token is classic or fine-grained? This will help us verify if the Git access token and Bito access key have been provided correctly. |
❯ curl -X POST http://mytest.example.com/api/v1/gitlab_webhooks
"Unauthorized: Secret is not valid"%
❯ curl -X POST -H 'Content-Type: application/json' -H "X-Gitlab-Token: 88da24e896aec8dd9519ae31f014128c" http://mytest.example.com/api/v1/gitlab_webhooks
"Oops!! Something Went Wrong. Please try again after some time"%
❯ curl -X POST -H 'Content-Type: application/json' -H "X-Gitlab-Token: 88da24e896aec8dd9519ae31f014128c" http://mytest.example.com/api/v1/gitlab_webhooks
"Oops!! Something Went Wrong. Please try again after some time"%
❯ curl -X POST -H 'Content-Type: application/json' -H "User-Agent: GitLab/17.2.1-ee" -H "X-Gitlab-Event: Merge Request Hook" -H "X-Gitlab-Webhook-UUID: d9c303c5-9ddd-4d7c-8355-0f2f63c4fd99" -H "X-Gitlab-Token: 88da24e896aec8dd9519ae31f014128c" -H "X-Gitlab-Event-UUID: 63ab84ed-f9a7-419a-a8d5-7eb2dd4e5e06" --json @gitlab-mr-body.json http://mytest.example.com/api/v1/gitlab_webhooks
"Oops!! Something Went Wrong. Please try again after some time"%
The text was updated successfully, but these errors were encountered: