I want to add a tag to an already existing image in an Azure Container Registry. Without pulling the image and pushing it to the container registry again. I found this https://stackoverflow.com/a/38362476/2546371, which looks like something that I want to do. But it doesn't seem to work for Azure Container Registry, which is kind of weird as I also found this https://learn.microsoft.com/en-us/rest/api/containerregistry/manifests, which says that it is in preview. And the "try it" function doesn't work as well.
When I try to get an image manifest.
curl {url}/v2/{image}/manifests/{reference}
I get:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty</center>
</body>
</html>
In Microsofts documenation is says:
Security
registry_auth
Type: basic
So I tried adding basic auth, where the password
is from the Azure portal under "Access keys".:
curl -L --user {username}:{password} {url}/v2/{image}/manifests/{reference}
I get some kind of website (HTML, CSS and javascript) as the response, not the expected json file.