-
Notifications
You must be signed in to change notification settings - Fork 3
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
Token works but getting 'Error from GitHub API: Bad credentials' #2
Comments
Hubot> Shell: Error from GitHub API: Bad credentials
Yes but it's probably my fault for not documenting it better.
Think of it as Or whatever the domain is for your GH Enterprise. Note that these are "DEFAULT" values, meaning they are the default target for the issues. Users can tell hubot to read and write issues in a different repo if they wish. By the way, this script never really caught on in my org so it hasn't been very well tested. People found the patterns impossible to remember and such a hassle to get correct that it was so much easier to open a browser instead. So feel free to try to improve that |
@benwtr great, thanks for that! And yea I see what you mean. Luckily I'm focused around one repo, so I'm thinking it will come in handy for my team. If they find difficulty, I look forward to making a pull request that will allow some more flexible input terms/interpretation. Again, thank you so much for all of the help. Look forward to playing with this. |
@benwtr I'm definitely a niche issue since a GitHub enterprise API exists at If I ever get this working I'll be sure to try to make a branch for using GitHub enterprise with it! |
I used a library called octonode to talk to github. Here is how you create a client with it and connect it to a non-default host such as GH Enterprise: https://github.com/pksunkara/octonode#build-a-client-from-a-different-host Take a look at https://github.com/hubot-scripts/hubot-gh-issues/blob/master/index.coffee The lines where it creates a client:
You could use an environment variable instead of hardcoding the hostname, of course. |
Man, I can not, for the life of me get away from this |
Sticking a bunch of If you want, you can try this slack. there's a |
@benwtr thanks for the enterprise token help.
I'm getting the "bad credentials" error above, but have verified that my token is valid.
I start my hubot like: HUBOT_GITHUB_TOKEN_FERNET_SECRETS={my token fernet secret} HUBOT_GH_ISSUES_DEFAULT_OWNER={email address to my GitHub enterprise account (from where the oath token is generated)} HUBOT_GH_ISSUES_DEFAULT_REPO={organization name} ./bin/hubot
If I run
hubot github token verify
it returns: "Your GitHub token is valid on github.{my enterprise}.com."But if I run
hubot github show issue #247
I get the errorHubot> Shell: Error from GitHub API: Bad credentials
. Have I done something wrong? or any thoughts on how I can start debugging this/looking?The text was updated successfully, but these errors were encountered: