virt-s1 / bootc-workflow-test

MIT License
2 stars 3 forks source link

test: set container auth before using it #240

Closed shi2wei3 closed 4 months ago

henrywang commented 4 months ago

I think we can use skopeo inspect --creds USERNAME[:PASSWORD] in shared_lib.sh. This only works with quay.io. For the registry-proxy, this will report error.

shi2wei3 commented 4 months ago

~I think we can use skopeo inspect --creds USERNAME[:PASSWORD] in shared_lib.sh.~ This only works with quay.io. For the registry-proxy, this will report error.

registry-proxy allow anonymous access, so it won't require auth, right? If so, your solution maybe better since bib use root auth whereas os-replace and anaconda use user auth. Let skopeo inspect take care of its own auth is better.

henrywang commented 4 months ago

~I think we can use skopeo inspect --creds USERNAME[:PASSWORD] in shared_lib.sh.~ This only works with quay.io. For the registry-proxy, this will report error.

registry-proxy allow anonymous access, so it won't require auth, right? If so, your solution maybe better since bib use root auth whereas os-replace and anaconda use user auth. Let skopeo inspect take care of its own auth is better.

Right, but registry-proxy does not allow wrong user here. That means anonymous or correct user/pass.

shi2wei3 commented 4 months ago

~I think we can use skopeo inspect --creds USERNAME[:PASSWORD] in shared_lib.sh.~ This only works with quay.io. For the registry-proxy, this will report error.

registry-proxy allow anonymous access, so it won't require auth, right? If so, your solution maybe better since bib use root auth whereas os-replace and anaconda use user auth. Let skopeo inspect take care of its own auth is better.

Right, but registry-proxy does not allow wrong user here. That means anonymous or correct user/pass.

Oh, that's bad.

henrywang commented 4 months ago

Another solution is create a new function in shared_lib.sh. If IMAGE_URL starts from quay.io, use --creds USERNAME[:PASSWORD], else keep the current one. Then call this function just after dump_runner call.

shi2wei3 commented 4 months ago

Another solution is create a new function in shared_lib.sh. If IMAGE_URL starts from quay.io, use --creds USERNAME[:PASSWORD], else keep the current one. Then call this function just after dump_runner call.

make sense to me, you can create a new PR and drop this one.

shi2wei3 commented 4 months ago

fix in https://github.com/virt-s1/bootc-workflow-test/pull/241#pullrequestreview-2010361085