Skip to content
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

Error: Require an oauthToken or token option #438

Open
scbot1729 opened this issue Dec 9, 2021 · 1 comment
Open

Error: Require an oauthToken or token option #438

scbot1729 opened this issue Dec 9, 2021 · 1 comment

Comments

@scbot1729
Copy link

Here is the stack trace, what is wrong?

at /root/staticman/lib/GitHub.js:33:15 [20/1834]
at new GitHub (/root/staticman/lib/GitHub.js:46:7)
at Object.module.exports.create (/root/staticman/lib/GitServiceFactory.js:11:14)
at /root/staticman/lib/Staticman.js:32:35 at new Staticman >>>...(/root/staticman/lib/Staticman.js:46:7)
at module.exports (/root/staticman/controllers/process.js:126:27) at Layer.handle [as handle_request] (/root/staticman/node_modules/express/l
ib/router/layer.js:95:5) at next (/root/staticman/node_modules/express/lib/router/route.js:137:13)
at /root/staticman/server.js:169:14 at Layer.handle [as handle_request] (/root/staticman/node_modules/express/l
ib/router/layer.js:95:5) at next >(/root/staticman/node_modules/express/lib/router/route.js:137:13) at /root/staticman/server.js:144:14 at Layer.handle [as handle_request] >>>(/root/staticman/node_modules/express/lib/router/layer.js:95:5) >at next (/root/staticman/node_modules/express/lib/router/route.js:137:13)
at /root/staticman/server.js:129:14 at Layer.handle [as handle_request] >(/root/staticman/node_modules/express/lib/router/layer.js:95:5)

Here is the config
config.production.json

{ "githubToken": "XXX",
  "githubPrivateKey": " -----BEGIN RSA PRIVATE KEY----- xXX",
   "rsaPrivateKey": " -----BEGIN RSA PRIVATE KEY----- XXX",
   "port": 8080
}

And the staticman.yml is
same as staticman.sample.yml

What am I doing wrong? I posted to

http://spamcheetah.com:8080/v3/entry/github/<bot>/<repo>/master/comments

@JaderDias
Copy link

If you're using the legacy config githubToken, you need to have options version = 1 or 2
https://github.com/eduardoboucas/staticman/blob/master/lib/GitHub.js#L21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants