Skip to content

Commit add4feb

Browse files
authored
Merge pull request #2332 from lizardruss/fix-wincreds
fix: use registry token for pull secrets
2 parents da3afdf + 32bd30b commit add4feb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/devspace/pullsecrets/init.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package pullsecrets
22

33
import (
4+
"strings"
45
"time"
56

67
devspacecontext "github.com/loft-sh/devspace/pkg/devspace/context"
@@ -171,6 +172,12 @@ func (r *client) createPullSecret(ctx devspacecontext.Context, dockerClient dock
171172
if password == "" && authConfig.IdentityToken != "" {
172173
password = authConfig.IdentityToken
173174
}
175+
176+
// Handle Azure Container Registry (ACR) when credentials helper does not provide a username
177+
// https://learn.microsoft.com/en-us/azure/container-registry/container-registry-authentication?tabs=azure-cli#az-acr-login-with---expose-token
178+
if username == "" && strings.HasSuffix(authConfig.ServerAddress, "azurecr.io") {
179+
username = "00000000-0000-0000-0000-000000000000"
180+
}
174181
}
175182
}
176183

0 commit comments

Comments
 (0)