Azure Nuget Artifact not visible in UiPath package manager

Hi @ksjnovaro

Authentication via credentials is not currently supported. However, it is possible to access it by using an API key.

See comments below that it is indeed possible :slight_smile:

Is that documented anywhere? Examples perhaps? I’ve tried it all…

After a lot of digging, I found a cute little paragraph in our documentation that should help you :slight_smile:

See here:
https://studio.uipath.com/v2018.4/docs/managing-activities-packages#section-adding-custom-feeds

And the paragraph in question:

If you want to add a custom NuGet feed that requires authentication, you can follow the steps explained here, and properly add the NuGet feed, username and password values in the NuGet.config file, located at the following path: %AppData%\NuGet . When it’s done, the feed should be visible in the Package Manager .

I hope it helps :slight_smile:

3 Likes

Hi everyone, UiPath Studio supports secure feeds. Just follow the documentation and you should be able to configure your NuGet Feeds with API Key or Credentials (username/password). Studio will receive a UI upgrade in the future so that you can add these directly in the UI.

2 Likes

Ok, i’ve tried what you suggested already…

my nuget config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSourceCredentials>
     <MyFeed>
        <add key="Username" value="MyMail" />
        <add key="ClearTextPassword" value="MyPassword" />
    </MyFeed>   
</packageSourceCredentials>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="MyFeed" value="MyFeedUrl" />
    <add key="Downloads folder" value="C:\Users\Me\Downloads" />
  </packageSources>
</configuration>

My studio logged exception:

    13:17:30.5549 => [DEBUG] [StudioTraceListener] [7] NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source URL-hidden-by-forum-staff. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at NuGet.Protocol.HttpSource.<>c__DisplayClass14_0`1.<<GetAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.HttpSource.<GetAsync>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
   --- End of inner exception stack trace ---
   at NuGet.Protocol.ServiceIndexResourceV3Provider.<GetServiceIndexResourceV3>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.ServiceIndexResourceV3Provider.<TryCreate>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.PackageSearchResourceV3Provider.<TryCreate>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__16`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.PackageExplorer.Core.Services.SingleFeedSearchService.<GetSearchService>d__10.MoveNext() in D:\a\1\s\Studio\UiPath.PackageExplorer.Core\Services\SingleFeedSearchService.cs:line 126
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at UiPath.PackageExplorer.Core.Services.SingleFeedSearchService.<SearchAsync>d__7.MoveNext() in D:\a\1\s\Studio\UiPath.PackageExplorer.Core\Services\SingleFeedSearchService.cs:line 44

any clues on what im doing wrong here? error message does not help much…
the provided mail and password is administrator in the TFS source.

Hi @ksjnovaro

This is strange, as it looks proper.

I hope @carlos_hxc can chime in a bit, as it seems he’s solved it with the same solution:

1 Like

@loginerror @mircea Thank you very much. Worked flawlessly.

Could i see your config?

Sure:

3 Likes

Will have to remember this for when we upgrade.
This might be useful for keeping a repository of re-usable libraries, rather than a shared network location.

1 Like

Hey Gerado

Your “User” in username, is that your azure email or?

if you access your nuget feed URL in the browser, what is the response like?

  1. Yes, azure e-mail in my case.
  2. The actual json response, provided by the browser (please note you need to have proper browser access through authentication first)
1 Like

Still no luck… :frowning:

If you are trying to get Orchestrator to automatically pull from an Azure Packages Nuget feed I think I can help…

First setup secondary credentials for your Azure account.

Second, in Orchestrator configure the deployment settings to use the V2 URL of the Nuget feed - NOT v3. Such as:

https://pkgs.dev.azure.com/orgname/_packaging/feedname/nuget/v2

Third, enter your secondary credentials.

Hope that helps.

2 Likes

Hi!

What do you mean by “secondary credentials”?

Sorry the correct term is Alternate Credentials.

https://dev.azure.com/orgname/_usersSettings/altcreds

1 Like

Instead of the alternate credentials, it would be great if we could use an API token from Azure DevOps, as explained here.

The problem with this is that there is an arbitrary limitation on the password length for the package authentication credentials in Orchestrator, and the token generated in Azure DevOps won’t fit.

@loginerror Is there any chance this upper limit can be increased?

Hi @nkuik

I believe this might not be possible, but feel free to reach to our technical support for more certain answer.

From my research, it would seem that the length might be related to the data type of the data table that stores the information related to the field.

Hey @cheapshot2000, @loginerror, all,

I am trying to connect Orchestrator to an Azure DevOps > Azure Artifacts instance which will host our packages. I have set things up like you have indicated - i.e. Alternate credentials, and using the v2 feed URL. I keep getting the same error though when publishing a new package to Orchestrator via Studio connected with Orchestrator - “Error: System.ApplicationException: Publish of workflow project to Orchestrator failed. Cannot connect to packages feed, the Deployment Settings may be invalid. —> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Cannot connect to packages feed, the Deployment Settings may be invalid.

Any idea what I could be missing? Seems like I have followed what has worked for others…I am sure I am missing a devil that is in some detail!

Got any screenshots you can share?