-
Notifications
You must be signed in to change notification settings - Fork 1.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
dotnet msbuild fails to restore from private Azure feed #4430
Comments
@jcagme does your result change if you specify a version, e.g. I don't at all know the history here like I'm sure @rainersigwald or @jeffkl do, but at least in the original #2850 implementation it looks like the nuget resolver required a version. |
|
Don't know if relevant or not but found a difference, at least in the logs, of the endpoints that are attempted to get the package from a 2.1 and a 3.0 CLI: For instance: 3.0
Full log: https://dev.azure.com/dnceng/internal/_build/results?buildId=219589 2.1
Full log: https://dev.azure.com/dnceng/internal/_build/results?buildId=219593 Even though 3.0 doesn't log the internal feed the logged error claims it couldn't load the index from it |
The logs are coming from the SDK resolver. I don't know of anything that has changed there. I don't have access ( 😢 ) to the logs to see if there's something obvious happening. Basically NuGet fails fast if there's a source that's unreachable. What are the versions of 2.1 and 3.0 that your testing. For all we know they could have the same exact same NuGet bits. |
This is pretty complicated. Arcade running eng/common/internal-feed-operations.ps1 which does the following:
The log then contains:
The SDK resolver is just calling |
3.0:
2.1
|
Credentials are set correctly. Two things I did to check, which are no longer in the build, 1) Printed the environment variable which was set correctly, 2) Ran the Cred Provider in standalone mode which basically checks whether it can fetch a token from envvar, VS, etc. and if it can, then it makes sure it is valid. If needed I can put these back in the build. |
FYI the cred provider does not check tokens for validity. Can you set NUGET_CREDENTIALPROVIDER_LOG_PATH (https://github.com/Microsoft/artifacts-credprovider#help) and then emit the log? I'm not sure why detailed logging isn't enough to get the credential provider's verbose output on the console, but apparently it isn't. You're looking for either the line |
More info per preview version. 3.0.100-preview-009812 (preview 2)
3.0.100-preview3-010431 (preview3)
3.0.100-preview4-011223 (preview4)
3.0.100-preview5-011568 (preview5)
3.0.100-preview6-012264 (preview6)
setting the envvar for logs now... |
The other piece of the issue we are hitting is similar to NuGet/Home#6609 where I've included information and logs about our particular scenario. Issue is closed tho... /fyi: @markwilkie |
I tried a bunch of different things and the only logs flushed into the file are those of running the CredProvider tool in standalone mode:
|
This is a verbose log build with shows that the PAT was set correctly since CredProvider was able to read it from the envvar so auth is fine (I think). Now, during |
Possibly related to NuGet/Home#8198 |
Maybe there's an issue here with a similar root cause as NuGet/Home#8688. The fix for NuGet/Home#8688 will also include some resolver fixes. |
Steps to reproduce
dotnet msbuild <proj>
where has a reference stored in an internal Azure feedProject file
Package source in nuget.config
(Ping me for the token)
When using dotnet version 2.1 the Arcade SDK is restored correctly as seen in
dotnet msbuild 2.1
of https://dev.azure.com/dnceng/internal/_build/results?buildId=219211.dotnet version 2.1 and 3.0 work fine when doing
dotnet restore <proj>
as seen inCmdLine
of https://dev.azure.com/dnceng/internal/_build/results?buildId=217065 and https://dev.azure.com/dnceng/internal/_build/results?buildId=219105I don't really know if the issue is in msbuild, nuget or CredProvider.
/fyi: @rainersigwald @zarenner
The text was updated successfully, but these errors were encountered: