-
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
FileNotFoundException thrown when creating commit status #232
Comments
I'm seeing this too with: Git Client Plugin 1.15.0 |
I also see this. ghprb v1.17 |
For us it turned out that we had the right permissions for the app, but the user didn't have write access to the repository we were trying to update. |
@tobowers interesting, I did add write access for our jenkins bot, but I wish I didn't have to do that. The access token I am using for the pull request builder allows |
@tobowers @brettlangdon Do you have any solution?, also i am suffering with the same problem. |
@bilalyasar giving jenkins write access to the repo is what solved it for me :( |
@janinko @uohzxela @tobowers @brettlangdon @bilalyasar Updating Jenkins + plugins also began producing this error in our instance. Granting the machine-users group in our GitHub organization write access to the repositories is also what finally solved this annoying issue for us as well. I really don't like the idea of having to grant machine-users write access to repositories just for Jenkins to be able to update status though. Since it appeared to work just fine before updating plugins, I have to assume that something changed either in the plugins or GitHub's API (thus forcing plugin changes). Seeing as it had continued working right up until updating plugins, I'm inclined to believe that it is a change in a related plugin rather than the GitHub API. Is write access a new inherent requirement imposed by GitHub's API, or was it just a change in a plugin that could be updated to revert to the previous behavior of only requiring read access? (I apologize for not being more useful, I'd look into it myself if I weren't so busy with current deadlines!) |
I am seeing this. And I'm seeing that the comment fallback is no longer working. |
Ran into this as well. Fix for us was to set the username in the "Admin list" section of the job config to the username of the user whose token we are associating with the plugin. Very strange. |
Fix issue janinko#232 due to changes in underlying api
Same here.
This fixed it for us as well! Versions:
There is also a jira issue: https://issues.jenkins-ci.org/browse/JENKINS-27056 |
This workaround didn't help us. Did you need to have the admin user as the only entry in the "Admin list" field? I can't find a workaround for this issue despite having tried everything suggested here and at jenkinsci#117 and https://issues.jenkins-ci.org/browse/JENKINS-27056. We get multiple errors about "FileNotFound" trying to hit something on the v3 (Enterprise) GitHub API, which we are not using. We're using 1.24.5 of GHRPB, and the latest available of everything else. Does anyone know which old versions of GH API and / or GHPRB still work? I'm glad to go back to a last known good version, but can't figure out what that would be... |
Do you have 2FA enabled on the account you're using to talk to the API? |
No. |
@mboersma see version list above or below, our current set of versions that works fine:
|
We're not using GH enterprise, which is why the error message seems indicative of a bug:
GH PR builder plugin had the same bug for us with version 1.24.2, just fyi. |
In the latest, 1.24.8 you can turn off the status updates so you don't need write access. |
@DavidTanner |
I get this same issue even though I have done all the workarounds listed here:
The project I'm trying to use this for is https://github.com/sailfish-sdk/sailfish-qtcreator. Plugin version 1.27. |
There is something weirder going on with the credential integration. If I click on the "add credentials" button on the page, and add a credential, it does not show up in the dropdown menu. Refreshing the page does not help. Adding it via the global credentials menu does work (once), but only for a username/password combo. Secret text credentials do not show up in the dropdown menu no matter what you do, even though the wiki page says they should work. |
Is anyone else still getting this issue? |
Seems to work now in 1.29. |
I recently updated to 1.29 and I am still seeing theses errors. Jenkins is successfully writing a comment, But these errors still occur. |
This error is caused because the account you have told ghprb to use does not have commit access to the repository it is using (despite what you may have checked off when making the security token (you can't grant access you do not have)) By default, it tries to use an api to write a commit status which requires write access. The maintainers here might have a better way of handling the logging, I was much more concerned with getting the commenting working again which broke after an api change. |
I had same issue and problem was that team didn't have repository permission. |
To save anyone else the hassle, if you want to fall back to comments on the PR, go into Configure System and then under the GitHub Pull Request Builder section, check the box for "Use comments to report results when updating commit status fails" |
i am facing this issue with github pull request plugin- 1.35.0 Can someone help me? |
Fix issue janinko#232 due to changes in underlying api
For some reason, GHPRB isn't able to change commit status in GitHub without this change. See also [1] or [2]. [1] janinko/ghprb#232 [2] https://issues.jenkins-ci.org/browse/JENKINS-27056
When the build process is triggered by a pull request made by a user in our Github organization, this exception message invariably appears in the console log. It is not a critical bug as we are able to deploy our app through the build process without any problems. Right now we are using Jenkins to deploy staging apps. However, this may be a potential problem and in that case, we don't want this exception issue to mess with our build process for production apps. We are using an access token from a bot that's a member of our Github organization. I am guessing the ghprb plugin fails to include the access token when it makes calls to the Github API, resulting in this response:
The cause could be due to some of the updated plugin dependencies (we have updated all the plugins that we have) which break the ghprb build.
Exception message:
The text was updated successfully, but these errors were encountered: