Microsoft Certified: DevOps Engineer ExpertDesign and implement source controlEasy
A development team uses Azure DevOps for their source control and build pipelines. They maintain a private NuGet feed for internal packages. They want to ensure that all build pipelines automatically authenticate and publish new package versions to this private feed without requiring manual credential management within each pipeline definition. Which service connection type should they use to connect to the private NuGet feed?
- ANuGet service connection
- BAzure Resource Manager service connection
- CGeneric service connection
- DGitHub service connection
Show answer & explanationAnswer & explanation
Correct answer: A. NuGet service connection
The NuGet service connection type in Azure DevOps is specifically designed to authenticate and interact with NuGet feeds, including private feeds hosted within Azure Artifacts or external NuGet servers, simplifying package publishing and consumption in pipelines.
Why the other options are wrong
- B. An Azure Resource Manager service connection is used for deploying to or managing Azure resources, not for connecting to a NuGet feed.
- C. A generic service connection is too broad and would require manual configuration of authentication headers or parameters, which is less ideal than a specialized connection.
- D. A GitHub service connection is for integrating with GitHub repositories, not for connecting to NuGet feeds.
NuGet Service Connection
A type of service connection in Azure DevOps specifically designed to establish authenticated connections to NuGet package feeds (public or private).
- Simplifies authentication for NuGet tasks in pipelines.
- Supports Azure Artifacts feeds and external NuGet servers.
- Used for publishing and consuming NuGet packages.
Memory trick: Think of service connections as 'smart plugs': each is designed for a specific type of external system, like a NuGet plug for NuGet feeds.