azure container repository login

az login
az acr login --name repoName

az acr login fails on mac

The following should just work:

az acr login -n myRegistry

But on MacOS I was getting this:

Error saving credentials: error storing credentials - err: exit status 1, out: `The user name or passphrase you entered is not correct.`
Login failed.

Thanks to this stackoverflow question the solution was to:

Try opening Keychain Right-click on the login keychain and try locking it and then unlocking it again.