-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACR] Add a new argument '--expose-token' for 'az acr login' #12077
Conversation
add to S165. |
tenant_suffix=tenant_suffix, | ||
username=username, | ||
password=password) | ||
logger.warning("You can perform manual login with the ouput access token, for example: 'docker login loginServer -u GUID -p accessToken'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the GUID
here should be 00...1
always. If yes, let us just use the fixed vaule.
} | ||
return token_info | ||
|
||
tips = "You may want to use 'az acr login -n MyRegistry --expose-token' to get an access token, which does not require Docker to be installed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the real registry name instead of MyRegistry
so that users can just copy & paste
from azure.cli.core.util import in_cloud_console | ||
if in_cloud_console(): | ||
raise CLIError('This command requires running the docker daemon, which is not supported in Azure Cloud Shell.') | ||
raise CLIError('This command requires running the docker daemon, which is not supported in Azure Cloud Shell.' + tips) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need a white space string before the Tips
logger.warning("You can perform manual login with the ouput access token, for example: 'docker login loginServer -u GUID -p accessToken'") | ||
token_info = { | ||
"loginServer" : login_server, | ||
"GUID" : username, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again username
could be None and if yes, the value will be 000...1
.
…gistry' with user's real registry name in tips 2.Revise wording 3.Fix trailing whitespaces
Close #9442
Behavior:

[specify --expose-token]
[docker command error]

[help manual]

History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.