-
Notifications
You must be signed in to change notification settings - Fork 198
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
codespaces azdo git config azd only #2088
codespaces azdo git config azd only #2088
Conversation
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.
Thanks for taking the time to find a more targeted solution here (as well as one that doesn't require us to insert our own credential helper into the chain). I think this is a good way to unblock the mainline AzDo pipeline scenarios in environments where you don't have an existing credential helper that is going to auth you to the repository you are working with.
Longer term it would be nice to understand if we can be playing with the installed credential helper in a more first-class way (by giving it the PAT we created for the user's repository) but this feels like a good balance where we get the end to end story working without mucking around too much with the user's configuration.
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.
Love the -c
stuff. Thanks for digging in!
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
Based on the feedback from #2068, we don't really want azd to set git credential-helpers. Specially if the helper is just a quick bridge to pull a PAT from an env-var.
We would prefer to let customer's git-config unchanged.
This PR introduces a different approach which uses
-c url.<PAT+Host>.insteadOf=<Host>
to use the PAT on https for pushing code. The configuration is not persisted to config,Users might face a later challenge if they try to use git later, as git will either prompt for PAT again or fail if there is another configuration (like in Codespaces). But, at least for azd, it will all work as expected.
I tested this on Codespaces :)
fix: #1993
Updating command runner as well to support getting a list of values which the caller knows are sensitive and should be redacted before logging them. Example: