-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Error on az ad sp create-for-rbac #24857
Comments
This seems to be a problem running on Git Bash - with some modification I managed to run the same command on a Command Prompt and it worked |
Thanks for the feedback! We are currently investigating and will update you shortly. |
@MarkBird generally the commands are written to run in the Azure Cloud shell which I tested and did not get the same error. Running on a on-prem bash environment sometimes does not work exactly as copied. We have had this kind of issue on a few docs. Unfortunately it is hard to write commands and scripts that will work for everyone specific environment. I will close this out as the commands do appear to work as written in the Cloud Shell environment CC @dlepow |
It would be very helpful to people in the future if you could sort this out. Just saying it's ok cos it wroks in the cloud shell is just very annoying to those whove wasted an hour or two using Bash before finding this. issue. |
Yes, to state that its hard to write scripts to work everywhere is a bit like state that its enough to write software which works only on my local computer 😂😂 |
I also receive this same error that appears to be based on the same bug when I run the following command with the Azure CLI from a git bash prompt:
Here is the error:
I guess I'll need to switch over to Powershell for this task. |
This Bug is was never solved and should be reopened again. I create a new issue. |
Thank you for creating that issue in the right repo @mruepp ! In case anyone hasn't seen it, here is the link: Azure/azure-cli#16317 |
Just so others who've experienced this issue know, I can confirm the command works fine on WSL. Sad it cant' work on GitBash! Client Utility is supposed to work on a variety of environments and not just cloud shell. |
So MSYS_NO_PATHCONV=1 does solve the issue. This issue is solved. |
This worked. Great! |
just set export MSYS_NO_PATHCONV=1 |
just set export MSYS_NO_PATHCONV=1 and it work on Gitbash.This issue is sloved. |
There seems to be a bug creating service principal (running on Git Bash) -
If I run
az ad sp create-for-rbac --name $ACR_NAME-pull --scopes $(az acr show --name $ACR_NAME --query id --output tsv) --role acrpull --query password --output tsv
I get an error in requests:msrest.exceptions.ClientRequestError: Error occurred in request., InvalidSchema: No connection adapters were found for <path>
For some reason it seems to be concatenating a Git folder path:
C:/Users/<username>/AppData/Local/Programs/Git
with the result of $(az acr show --name $ACR_NAME --query id --output tsv) which looks like:
/subscriptions/<id>/resourceGroups/<resource group name>/providers/Microsoft.ContainerRegistry/registries/<registry name>/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27acrpull%27&api-version=2018-01-01-preview
resulting in it trying to make an HTTP request to a file location on my C: drive, which obviously doesn't work
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: