wget -O /etc/apk/keys/alpinersa.rsa.pub http://<username>:<password_encrypted>@localhost:8081/artifactory/api/security/keypair/public/repositories/test-alpine
Note: Please ensure to use the same key name you have selected in the Virtual/Local repositories to configure in the Alpine machine as well or the Artifactory won’t accept it. Here, the pub key is saved as alpinersa.rsa.pub, because the name we selected in the repository is ‘alpinersa’.
You can verify this by doing an ‘apk update’ and if it results without a “UNTRUSTED signature” error then validation is successful.
/ # apk update fetch http://admin:*@localhost:8081/artifactory/test-alpine/v3.18/main/x86_64/APKINDEX.tar.gz OK: 5156 distinct packages available