Search code examples
c#azure-devopsnugetazure-artifacts

Share Nuget Package with different Azure DevOps Server over Upstream


Summary:

  • I am trying to get an Azure Artifact (NuGet Package) synchronized between two DevOps Projects using Feeds
  • When both Projects belong to the same DevOps tenant i have no problems
  • When i try to synchronize between two different tenants i get an error.

=> Is this doable in general or impossible?

I have the following setup:

Org A

  • User A
  • DevOps Server A (Needs external NuGet Package)
  • Feed A

Org B

  • User B
  • DevOps Server B
  • Feed B (external NuGet Package)

Is it possible to connect the feed of Org B to Org A with Azure custom Upstreams (Add Upstream -> Azure Artifacts feed in another organization -> azure-feed://OrgB/ProjectB/FeedB@Local -> NuGet -> Save)

If i want to save the Upstream Resources I always get the following error message: The source at 'azure-feed://OrgB/ProjectB/FeedB@Local' cannot be configured as an upstream because it does not exist or you do not have permissions to it.

I tried giving access to User A to Org B but it does not work. Is this even possible (in a technical sense)? If not, what is the best way to share a NuGet Package with a different Organisation (different Azure DevOps Server)? I do not want to be dependent on a server in Org B. Best case is the NuGet Package is mirrored in Org A. In the unlikely event that the server or Azure DevOps from Org B is down, the build in Org A still works.

  1. I invited User A to DevOps Server B. (https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/add-external-user?view=azure-devops)
  2. Added User A to Feed B (https://learn.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops)

Solution

  • Add upstream source needs to be in the same Azure Active Directory.
    Besides , you use service connection->nuget->External Azure Server to share Nuget Package.

    enter image description here