knative/func

When I used func deply with personal CA certs of container registry, an 'unknown authority' error happened.

shawn-robusoft opened this issue · 5 comments

I created one harbor registry and the ca certs was signed personally. When I used func deploy to push the image and deploy in the knative cluster ,an error happend. Could anyone tell me how to solve it?
func deploy --registry VM-0-100-centos:8443/test/repo/hello --image VM-0-100-centos:8443/test/repo/hello
function up-to-date. Force rebuild with --build
Error: failed to get credentials: creating push check transport for VM-0-100-centos:8443 failed: Get "https://VM-0-100-centos:8443/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority

@shawn-robusoft have you made the cert system and cluster wide trusted?

You should made the cert trusted by your desktop system and also trusted by your k8s cluster.

Hello,

I'm having a similar issue. I'm just trying to setup a knative system on a 3 node cluster at home. My Harbor repository is located in my K8s cluster. I have a TLS certificate in my Nginx Ingress, and I have added the certificate to my Windows Trusted Root CA Certificates. I can navigate to the Harbor registry in my browser and the certificate is recognized.

I'm using the sample Go program from 'func create', and I'm trying to run the Knative cli build command to push the image to the registry. My end goal is to utilize remote building and deployment, however I wanted to try to understand some of the Knative basics first.

I have attempted this with both 'func' and 'kn func'. Does the func cli need the certificate in a specific place or utilize a particular environment variable such as when utilizing docker remote builds?

kn func create -l go go-test
cd go-test
kn func build --registry=/myRepository --push -v
Error: Get "https:///v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority

Hello,

I'm having a similar issue. I'm just trying to setup a knative system on a 3 node cluster at home. My Harbor repository is located in my K8s cluster. I have a TLS certificate in my Nginx Ingress, and I have added the certificate to my Windows Trusted Root CA Certificates. I can navigate to the Harbor registry in my browser and the certificate is recognized.

I'm using the sample Go program from 'func create', and I'm trying to run the Knative cli build command to push the image to the registry. My end goal is to utilize remote building and deployment, however I wanted to try to understand some of the Knative basics first.

I have attempted this with both 'func' and 'kn func'. Does the func cli need the certificate in a specific place or utilize a particular environment variable such as when utilizing docker remote builds?

kn func create -l go go-test cd go-test kn func build --registry=/myRepository --push -v Error: Get "https:///v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority

Just wanted to post a quick note that my issue was related to some forgotten ENV variables for a remote docker connection. Once the crt file was added to the machine with the remote docker daemon, the function was built and pushed correctly.

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.