Navigation Menu

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

build status not updating pull request; log message not very helpful #203

Open
ncolton opened this issue Oct 30, 2014 · 1 comment
Open

Comments

@ncolton
Copy link

ncolton commented Oct 30, 2014

When the build runs, I managed to get this information in Jenkins logs:

Could not update commit status of the Pull Request on GitHub.
java.io.FileNotFoundException: https://api.github.com/repos/:organization/:repo/statuses/:commit_hash
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)

After a great deal of troubleshooting, I eventually found that the reason some repos were getting pull requests updated with status, and others were not, was that the GitHub user used by Jenkins did not have write permissions to the repositories which were not getting status updates.

I suspect it is throwing this error as HTTP status codes 404 and 403 are thrown by the API so as to not reveal information about the repositories, so this results in the 404 being interpreted as FileNotFound. It would be incredibly helpful if, rather than a FileNotFoundException, a message indicating the permissions problem is the cause so that the issue can be remedied by administrative changes with a lot less wasted time.

@DavidTanner
Copy link
Collaborator

I have added some logging so that the console log of the build will reflect that the error is probably because of bad credentials.

DavidTanner pushed a commit that referenced this issue Jan 20, 2015
several pull requests in the other repo.
DavidTanner added a commit that referenced this issue Sep 28, 2015
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