-
Notifications
You must be signed in to change notification settings - Fork 267
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
expected status code 200, got 401. Status: 401 Unauthorized #3527
Comments
Hey, thanks for reporting. What's the Also make sure you're not accidentally encoding |
Hello, I'm using the following curl command to download an image:
The command works independently, but it’s not working as expected within the above manifest. I’ve verified that there are no \n characters in the username or password. |
Interesting.. this is precisely what CDI is doing
|
No I don't have access to artifactory to check logs |
Okay, could you try executing this curl command from inside a pod in the cluster, in the same ns? |
curl working from pod
|
|
Hello @akalenyu here is the required output from curl with verbose
|
This looks like the exact same thing CDI is doing. You could try to write a simple golang program that tries to pull from the artifactory, with your credentials, I expect that it would fail with the golang http client |
yes tried and getting expected status code |
Cool, so you can try spotting the bug, I believe it would be somewhere in https://github.com/kubevirt/containerized-data-importer/blob/c15ad1d5c12f572a8208dea35c6b045c52bdf7f1/pkg/importer/http-datasource.go |
What happened:
A Kubernetes Secret is used to securely pass credentials for accessing the Artifactory repository. The DataVolume configuration references this Secret for authentication to pull the image. The URL for the image source is specified within the DataVolume configuration, with artifact-repo-credentials providing the necessary accessKeyId and secretKey for access. credentials are correct but still seeing a 401 Unauthorized error
What you expected to happen:
A clear and concise description of what you expected to happen.
Additional context:
Add any other context about the problem here.
Environment:
kubectl get deployments cdi-deployment -o yaml
): v1.60.2kubectl version
): v1.29.0uname -a
): N/AThe text was updated successfully, but these errors were encountered: