How To Publish Processes And Libraries To Orchestrator Using Nuget Push?

How to publish processes and libraries to Orchestrator using nuget push?

Root Cause

The usage of the Processes API Key for the libraries feed or the Libraries API Key for the processes feed or the API Key/Source feed is incorrect.

Resolution

  • Download the nuget.exe file from https://www.nuget.org/downloads and get its local path to use it in the push command
or
  • In the cmd.exe, change the directory to the nuget.exe file path.

Upload / Push libraries to Orchestrator using Nuget push

  1. Find the libraries feed of the Orchestrator.

The easiest way to find the feed path for the libraries is to connect the Robot to Orchestrator using the UiPath Assistant, then open UiPath Studio -> Settings -> Manage Sources -> select Orchestrator Tenant and/or Orchestrator Host.

Example:


The same can be checked in Manage Packages under the opened project in UiPath Studio.

Example:

A library feed will look like:
  • ttps://YOUR_ORCHESTRATOR_HOSTNAME/nuget/v3/YOUR_LIBRARIES_FEED_ID/index.json

  1. Extract the API Key for the Libraries feed. For that, log in to the Orchestrator as an Administrator -> Tenant -> Settings -> Deployment -> get the value for API Key

Example:

  1. The final command will look like this:

nuget.exe push "C:\YOUR_LOCAL_PATH\TestNugetPushLibrary.1.0.2.nupkg" -ApiKey YOUR_LIBRARIES_API_KEY -Source https://YOUR_ORCHESTRATOR_HOSTNAME/nuget/v3/YOUR_LIBRARIES_FEED_ID/index.json -Verbosity detailed

Results:



Upload/Push packages to Orchestrator using nuget push

  1. Find the package feed of the Orchestrator.
    1. The easiest way to find the feed path for the packages is to connect the Robot to Orchestrator using the UiPath Assistant
    2. Install the Fiddler-Classic from https://www.telerik.com/download/fiddler
    3. Open Fiddler and start capturing all the traffic
    4. Open Studio -> create/open a process -> Publish -> Publish options -> Publish to Orchestrator Tenant Processes Feed -> Publish

Example:


  1. In Fiddler, find the POST /odata/Processes/UiPath.Server.Configuration.OData.UploadPackage?feedId=... -> the value after the feedId= is your Orchestrator Processes feed

Example:

This means that the process feed will look like:

  • https://YOUR_ORCHESTRATOR_HOSTNAME/nuget/v3/YOUR_PROCESSES_FEED_ID/index.json

  1. Extract the API Key for the Libraries feed. For that, log in to the Orchestrator as an Administrator -> Tenant -> Settings -> Deployment -> get the value for API Key

Example:

  1. The final command will look like this:

nuget.exe push "C:\YOUR_LOCAL_PATH\TestNugetPushProcess.1.0.2.nupkg" -ApiKey YOUR_PROCESSES_API_KEY -Source https://YOUR_ORCHESTRATOR_HOSTNAME/nuget/v3/YOUR_PROCESSES_FEED_ID/index.json -Verbosity detailed

Results:

1.jpg

More details about the nuget push command can be found Push Command : cli-ref-push.