Azure Artifacts Custom Package Error
See original GitHub issueDescription
I am trying to add custom Azure Artifacts Nuget package without success. I have edited/added the <packageSources> and <packageSourceCredentials> in the config file. but I am getting “Unable to retrieve package list…” Error in the Unity console when I hit the refresh button. Any suggestion would be appreciated.
… <packageSources> … <add key=“ABC” value=“https://pkgs.dev.azure.com/....json” /> … </packageSources> … <packageSourceCredentials> <ABC> <add key=“Username” value=“ABC@ABC.com” /> <add key=“Password” value=“1234567” /> </ABC> </packageSourceCredentials> …
System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00058] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 at NugetForUnity.NugetHelper.RequestUrl (System.String url, System.String userName, System.String password, System.Nullable`1[T] timeOut) [0x000b9] in <b7bde984cef1447da61a3fd28d4789b0>:0 at NugetForUnity.NugetPackageSource.GetPackagesFromUrl (System.String url, System.String username, System.String password) [0x0006c] in <b7bde984cef1447da61a3fd28d4789b0>:0 at NugetForUnity.NugetPackageSource.Search (System.String searchTerm, System.Boolean includeAllVersions, System.Boolean includePrerelease, System.Int32 numberToGet, System.Int32 numberToSkip) [0x000ce] in <b7bde984cef1447da61a3fd28d4789b0>:0 UnityEngine.Debug:LogErrorFormat(String, Object[]) NugetForUnity.NugetPackageSource:Search(String, Boolean, Boolean, Int32, Int32) NugetForUnity.NugetHelper:Search(String, Boolean, Boolean, Int32, Int32) NugetForUnity.NugetWindow:UpdateOnlinePackages()
- NuGet Package: [Custom Azure Artifacts Nuget Package]
- NuGetForUnity Version: [2.0.1]
- Unity Version: [2019.4]
- Operating System: [Windows10]
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
@jwittner Gotcha, I was just thinking that since I saw the popup that probably means my config credential wasn’t working properly anyways. The popup that showed up only asked for which Microsoft account I wish to use, and then it was able to find the saved password based on cached credentials on this machine. Thanks for the help.
That explains what is happening, our organization name has an hyphen and the regex is expecting only letters and numbers, so it will always fail to get the authentication feed.
These are the current naming rules for organizations in Azure DevOps, so the regex statement is missing the hyphen.