From 8cd3a34dc48005152b1a73765e55a12038c6b2aa Mon Sep 17 00:00:00 2001 From: filip Date: Wed, 4 Sep 2024 15:48:43 +0200 Subject: [PATCH] Add authentication notice on source access error nuget resolution --- internal/resolution/pm/nuget/job.go | 3 ++- internal/resolution/pm/nuget/job_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/resolution/pm/nuget/job.go b/internal/resolution/pm/nuget/job.go index dbd936e5..56a36267 100644 --- a/internal/resolution/pm/nuget/job.go +++ b/internal/resolution/pm/nuget/job.go @@ -207,6 +207,7 @@ func (j *Job) getNoInternetErrorDocumentation(matches [][]string) string { "Registry", "\"" + registry + "\"", "is not available at the moment.", - "There might be a trouble with your network connection.", + "There might be a trouble with your network connection,", + "or this could be an authentication issue if this is a private registry.", }, " ") } diff --git a/internal/resolution/pm/nuget/job_test.go b/internal/resolution/pm/nuget/job_test.go index ee6320f8..9f517ff4 100644 --- a/internal/resolution/pm/nuget/job_test.go +++ b/internal/resolution/pm/nuget/job_test.go @@ -115,7 +115,7 @@ func TestRunInstallCmdErr(t *testing.T) { { name: "No internet connection", error: "Unable to load the service index for source https://api.nuget.org/v3/index.json.\nAn error occurred while sending the request. \nThe remote name could not be resolved: 'api.nuget.org'", - doc: "Registry \"https://api.nuget.org/v3/index.json\" is not available at the moment. There might be a trouble with your network connection.", + doc: "Registry \"https://api.nuget.org/v3/index.json\" is not available at the moment. There might be a trouble with your network connection or this could be an authentication issue this is a private registry.", }, }