Registry experimental feature in 0.4.717 (5fc1202b95) #4207
-
I'm playing around with the experimental registry feature in this build: https://github.com/Azure/bicep/actions/runs/1176207276 Initially bicep publish will not run properly. the command:
just returns
In order to make bicep accept my publish command, I had to add this environment variable:
I have successfully pushed and pulled modules to my registry with oras (found here: https://github.com/oras-project/oras) authenticating with a mix of either AzureCLI/Docker or PowerShell/Docker. There seems to be some sort of dependency to docker in both cases, but that is for a discussion in another forum I assume. I would like to know, what I have to do to take me past the authentication error when running bicep publish and would love to share my further findings in this discussion. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 52 replies
-
In the current builds, auth is implemented using this class: https://docs.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet. The logic walks down the list of credential types until finds something that works. We don't have any dependency on docker cli being installed. ACR returns 403 if you authenticated correctly but don't have permissions to push or pull. Since you received a 401 you might not be authenticated. Did you do |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
There seems to be a similar issue with the vscode extension. I get the same 401 unauthorized as before when publishing. The difference is, that I get the error both when configuring a tenant local account in both visual studio and vscode and when authenticating with PowerShell or AzureCLI. Looking at the progmon trace, there is a lot of action from Microsoft.Asal.TokenService.exe |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Given this thread is so long, I will summarize a few things that were discovered with early/experimental testing of the Module Gallery. Related to: #2128
|
Beta Was this translation helpful? Give feedback.
-
credentialPrecedence has been implemented in #4762 and and makes it possible to define what credentials to use. Adding this to bicepconfig.json is all it takes:
Thanks, @majastrz ! |
Beta Was this translation helpful? Give feedback.
-
thanks for sharing you experience. Was really usefull when starting to experiment with the bicep registery modules.
use the alias in your main
Thanks to the bicep team for making this awesome feature ❤️ |
Beta Was this translation helpful? Give feedback.
Given this thread is so long, I will summarize a few things that were discovered with early/experimental testing of the Module Gallery.
Related to: #2128
anonymous Pull
feature is still in development.