As a Sitecore developer, encountering build errors can be quite frustrating. One common issue you might come across is the dreaded.
NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://sitecore.myget.org/F/sc-packages/api/v3/index.json.
Don't worry, though - you're not alone in facing this problem.
Sitecore relies on Myget as its primary public package source, which has been widely adopted by the Sitecore community. However, an unfortunate incident occurred when Myget experienced a prolonged outage, causing confusion and discussions within the community.
Fortunately, there's a silver lining! Sitecore already had plans in place to switch to Nuget as the new package feed by 30th November 2023, offering a more stable alternative.
When I personally encountered this error while working with my docker images, I decided to seek help from the community. Multiple discussions later, it became clear that a common recommendation was to update the Myget URL to the Nuget URL. The challenge for me was figuring out which URLs needed updating, as it wasn't immediately apparent.
To assist fellow developers facing the same issue, I'm sharing my experience and providing a step-by-step guide on how to make the necessary updates. Rob Earlam published a detailed article on how to update it to new feed. I'm attaching the article in reference section. In my case, updating the Sitecore key in the nuget.config file with the URL of the new Nuget source effectively and removing PowerShell Modules, removing PowerShell Repository resolved the error. You can obtain all the packages with the below configuration. Earlier it used to be different endpoints were used to obtain the packages specific to Identity, Commerce, XP and XM. Now with the migration you can use the single endpoints to obtain all packages.
To remove PowerShell Repository run the below command in your Windows PowerShell
Unregister-PSRepository -Name SitecoreGallery
To remove PowerShell Modules run the below command in your Windows PowerShell
Uninstall-Module -Name SitecoreDockerTools -AllVersions
Open the init.ps1 and update the feed URL from https://sitecore.myget.org/F/sc-powershell/api/v2 to https://nuget.sitecore.com/resources/v2/
Update the nuget.config with below key.
<add key="Sitecore" value="https://nuget.sitecore.com/resources/v3/index.json" />
With the below URL you can search all of the packages for new feed.
Remember, you're not the only one dealing with this situation, and the Sitecore community is here to support you.
So, if you've encountered the NuGet.Protocol error, don't panic - there are solutions available.
Note: Currently, the URL lacks the packages for Sitecore Experience Commerce, Sitecore Content Hub, Sitecore PowerShell, and Sitecore Installation Framework. The Sitecore team is actively working to rectify this situation. If you encounter any critical blockers in your project that require immediate attention, please don't hesitate to contact the Sitecore Support team.
Comentarios