CodeEngine
CodeEngine

Reputation: 296

How to create the secret key/value in VSTS to use it on Weebhook in Github

I want to trigger a Build in VSTS whenever a push is made to my repository in Github. I see that in settings in my repository in Github you can set up a webhook for VSTS.In fact I had this already working but changed the secret by accident and know I have no idea how to get the secret I have been trying to find it in vsts but not having any luck.

Please any help would be appreciated.

enter image description here

Upvotes: 1

Views: 288

Answers (1)

Marina Liu
Marina Liu

Reputation: 38106

If you create a CI build definition in VSTS to build the github repo, VSTS will create a webhook for push event in the github repo (as the screen shot you showed).

And if you changed the secret incorrectly by accident, you can delete the webhook and restore it in VSTS web page. Detail steps as below:

  • First delete the webhook:

    In github webhook -> Delete webhook -> Yes, delete webhook.

    enter image description here

  • Then restore the webhook:

    In VSTS web page -> edit the CI build definition -> Triggers Tab -> it will detect “The remote repository’s webhooks are missing or incorrect” -> Restore.

    enter image description here

Now the webhook restored with the correct secret and it can send request successful when push event occur.

Upvotes: 3

Related Questions