-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cannot get credentials to work #398
Comments
Note that the "Can one of the admins verify this patch" is working. It's only the build report posting which is failing. |
Also, while I used credentials manager to add extra credentials to the api.github.com domain, I can't select them in the job config. |
Once you add credentials using the manager you need to assign that to a github url in the main config. Then it is available to use per job |
In the main config, github API server URL is https://api.github.com and the credentials are github auto generated token credentials. The Test credentials button in that allows me to test those credentials, and all operations work, including posting comments. I have given the credentials a description. In the job config, I choose a set of github API credentials - the drop down only offers me one choice, which is the description I set of my credentials in the main config. However, in practice, the job gives the error above when it tries to comment on the pull request. I think, therefore, everything is as you ask. I can post screenshots, if that helps? What I don't understand is how every 'Test credentials' feature works in the global config, yet doesn't work in the job. The job is NOT using the github credentials for clone or pull, it's using the jenkins user's default ssh key, which is actually registered against a different github user, but that shouldn't matter, as that's not visible to API calls. |
Changing the global config to use the login/password credentials for api.github.com instead of the token didn't make the job work. Visiting the failing api.github.com URL in a web browser logged in as the user in question does not work, but I don't know if that's meant to work. It all boils down to "How can Test Credentials work, but the job not work?" |
It seems that moving the ssh key to the user for whom the token was created makes a difference. Can you confirm or deny the likelihood of this? |
@shevek I saw a similar error creating webhooks and fixed the problem by renaming the github repository and then changing it back to the original value, it seemed to be a problem on github's side: https://issues.jenkins-ci.org/browse/JENKINS-40359 |
Hi all, Jenkins v 2.90, GHPRB v1.39.0. The error message:
Testing connection at Manage Jenkins -> Configure Jenkins -> GitHub Pull Request Builder works fine. I tried to collect some logs, but there is no org.jenkinsci.plugins.ghprb logger. |
The credential checks in global config all work, it can post a comment, etc but the credentials themselves don't seem to work in the job. The only reason clone works is that it's using the default ssh keys.
Jenkins 1.651, GHPRB 1.31.1
The text was updated successfully, but these errors were encountered: