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

Helm ChartMuseum Login | /v2/ | 404 Not Found #793

Open
IfrKonv opened this issue Nov 30, 2024 · 1 comment
Open

Helm ChartMuseum Login | /v2/ | 404 Not Found #793

IfrKonv opened this issue Nov 30, 2024 · 1 comment

Comments

@IfrKonv
Copy link

IfrKonv commented Nov 30, 2024

Hello,
I've installed ChartMuseum version 0.16.2 via Docker, with these configurations:

version: '3.8'
services:
  chartmuseum:
    image: ghcr.io/helm/chartmuseum:v0.16.2
    ports:
      - "8080:8080"
    environment:
      - DEBUG=1
      - STORAGE=local
      - STORAGE_LOCAL_ROOTDIR=/charts
      - BASIC_AUTH_USER=myuser
      - BASIC_AUTH_PASS=mypass
    volumes:
      - /opt/docker-volumes/charts:/charts

I've exposed the service via HTTP with Nginx, and when I try to add the repo to Helm, I get:

$ helm registry login https://my.agency.com
Username: myuser
Password: 
Error: login attempt to https://my.agency.com/v2/ failed with status: 404 Not Found
$ 

the logs:

2024-11-30T15:59:15.942Z        DEBUG   [22] Incoming request: /v2/     {"reqID": "b26a1927-a97e-401c-904f-dd6b4f245443"}
2024-11-30T15:59:15.943Z        WARN    [22] Request served     {"path": "/v2/", "comment": "", "clientIP": "10.0.0.2", "method": "GET", "statusCode": 404, "latency": "274.368µs", "reqID": "b26a1927-a97e-401c-904f-dd6b4f245443"}
2024-11-30T15:59:16.359Z        DEBUG   [23] Incoming request: /v2/     {"reqID": "787fd8ae-d19d-488f-8684-b46665bea17e"}
2024-11-30T15:59:16.359Z        WARN    [23] Request served     {"path": "/v2/", "comment": "", "clientIP": "10.0.0.2", "method": "GET", "statusCode": 404, "latency": "41.738µs", "reqID": "787fd8ae-d19d-488f-8684-b46665bea17e"}

Could someone tell me what I'm doing wrong? I really can't figure out where the error is, it seems all correct.
I've also tried a direct curl and it works:

$ curl --user "myuser:mypass" https://my.agency.com/index.yaml
apiVersion: v1
entries: {}
generated: "2024-11-30T15:29:27Z"
serverInfo: {}

I've also tried to install the cm-push plugin, but obviously it asks me to log in first.
I thank in advance anyone who can provide some information to help me.
Regards

@IfrKonv
Copy link
Author

IfrKonv commented Nov 30, 2024

Update

I have simply added a rule in Nginx that rewrites /v2/ to the base path, and everything is working fine.

    location / {
        proxy_pass http://192.168.x.y:8080/;
    }

    location /v2/ {
        proxy_pass http://192.168.x.y:8080/;
    }

At this moment, I don’t know if everything works perfectly, but my question is: how is this procedure documented?

I hope this can help someone.

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

1 participant