Problem
When using the GitHub integration in IntelliJ IDEA, attempting to view the changes of a Pull Request fails with the error message:
Can't load changes
404 Not Found - Not Found
Retry
This occurs even though:
- The user is logged into their GitHub account in the IDE.
- The list of Pull Requests is visible.
- The Pull Request conversation (title, comments) can be viewed within the IDE.
- The Pull Request and its changes are fully accessible via the GitHub website.
Cause
The IDE fails to fetch the comparison between the base and head commits of the Pull Request via the GitHub API, resulting in a 404 error. This issue has been observed specifically when the GitHub account integration in the IDE is configured using a fine-grained Personal Access Token (PAT), even if the token has been granted permissions for Pull Requests and repository contents.
Resolution
Switch from using a fine-grained GitHub Personal Access Token to a classic Personal Access Token for the IDE integration.
- Go to GitHub account settings and generate a classic Personal Access Token with the necessary scopes (e.g.,
repo,read:org,gist,workflow,read:user,user:email) - In the IDE, go to Settings | Version Control | GitHub
- Remove the existing GitHub account connection (if it exists)
- Add the account again, choosing to log in with a token, and provide the classic PAT generated in step 1
After re-authenticating with the classic PAT, loading Pull Request changes should work as expected.
Comments
0 comments
Please sign in to leave a comment.