You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are authenticated and still experiencing 404 errors when trying to fetch and display an image from a private repository in a GitHub issue, the issue may be related to how GitHub handles attachments for private repositories. Here are some steps you can take to troubleshoot and potentially resolve this issue:
Steps to Troubleshoot and Resolve
Verify URL Format:
Ensure that the URL is correctly formatted and points to the correct resource. The example URL you provided looks like an attachment URL rather than a direct link to a file in the repository.
Check Access Permissions:
Verify that you have the necessary permissions to access the private repository and the specific issue where the attachment is located.
Direct Link to Image:
Sometimes, the way images are linked in issues can cause problems. Ensure you are using the correct format to link the image. For example:
Session Validity:
Make sure your session has not expired. Re-authenticate if necessary and try accessing the image URL again.
Use GitHub API for Authenticated Access:
If you need to programmatically access the image, use the GitHub API with authentication headers. Here’s an example in Python:
Embed Images in README or Wiki:
If the image is for documentation purposes, consider uploading the image directly to the repository (e.g., in a docs folder) and linking to it from the README or Wiki. This method can help avoid issues with attachments.
Additional Considerations
Private Repository Attachments:
Attachments in issues or pull requests in private repositories are often accessible only when logged in through a web browser. Direct links to these attachments might not work if accessed outside the authenticated session context.
Alternative Hosting:
If you continue to face issues, consider hosting the image on an external, secure image hosting service and linking to it from the issue.
Replace username, repository, main, and path/to/image.png with the appropriate values.
By following these steps and considerations, you should be able to troubleshoot and resolve the issue of images returning 404 errors in GitHub issues for private repositories. If the problem persists, reaching out to GitHub Support may provide further assistance.
When accessing notes that contain images for private models, the images fail to load and result in a 404 error.
Steps to Reproduce:
bldrs note: https://bldrs.ai/share/v/gh/bldrs-ai/test-models-private/main/ifc/vyzn/2024-05-06-romana/BIM_Steinwolle_Modell_areas,roof,groups.ifc/9669/15058/2269/2273/15240#i:2430003187;c:31.378,1.877,8.752,8.113,-6.416,-1.212;share:
github issue: https://github.com/bldrs-ai/test-models-private/issues/51
Expected Behavior:
The images should load correctly and be displayed within the note.
Actual Behavior:
Images do not load and instead a 404 error is received.
Screenshot of the Network tab:

The text was updated successfully, but these errors were encountered: