5

我正在尝试使用Probot Framework构建一个 GitHub 应用程序。

这是文件的内容index.js

module.exports = (robot) => {
  robot.log('Yay, the app was loaded!');
  robot.on('*', async context => {
    robot.log('Some event occured!');
  });
}

但是,当我运行此应用程序时,将其安装到存储库中后,我收到此错误:

03:38:34.831Z ERROR probot: signature does not match event payload and secret
  Error: signature does not match event payload and secret
      at verifyAndReceive (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/verify-and-receive.js:9:19)
      at IncomingMessage.request.on (/mnt/e/GSoC/test/test/node_modules/@octokit/webhooks/middleware/middleware.js:53:5)
      at emitNone (events.js:106:13)
      at IncomingMessage.emit (events.js:208:7)
      at endReadableNT (_stream_readable.js:1064:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

这个错误背后的问题是什么?我该如何解决这个问题?

4

1 回答 1

6

它说,signature does not match event payload and secret.

这背后的可能原因是存储库的WEBHOOK_SECRETin文件与https://github.com/settings/apps/your-app-name.env的不匹配。Webhook secret (optional)

正确配置 webhook secret 将修复此错误。

在此处输入图像描述

于 2018-03-29T04:03:40.127 回答