Skip to content

Bug: Images in README.md not rendering for private repositories #1474

@ntvuongg

Description

@ntvuongg

Description

When viewing a private model/dataset repository, images referenced in README.md fail to load with 404 error, even when the user is authenticated.

Steps to Reproduce

  1. Create a private model repository
  2. Add an image to assets/model_arch.jpg
  3. Reference it in README.md: ![Model architecture](assets/model_arch.jpg)
  4. Push to CSGHub
  5. View the model summary page while logged in

Expected Behavior

Image should render for authenticated users who have access to the private repo.

Actual Behavior

Image shows broken icon. Browser console shows 404 error.

Root Cause (from server logs)

"error":"AUTH-ERR-1"
"current_user":"","auth_type":"ApiKey"
"url":"/api/v1/models/<org-name>/<model-name>/resolve/assets/model_arch.jpg?current_user=&ref=main"

The frontend does not pass authentication token when fetching images via /resolve/ endpoint for markdown rendering. current_user is empty.

Environment

  • CSGHub Version: v1.15.0-ee (omnibus)
  • Deployment: Docker self-hosted

Workaround

Setting repository to public allows images to render, but this is not acceptable for private/internal projects.

Suggested Fix

Frontend should include JWT token or session cookie when fetching resources from /resolve/ endpoint for private repositories.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions