HylandSoftware/Harbor.Tagd

need support for https harbor

Closed this issue · 1 comments

when i try to clean up from https harbor.
it gives me below error.

dotnet ./dist/Harbor.Tagd.dll --config-file rules.yaml --endpoint https://harbor -u admin -p Harbor12345
[14:37:19 INF] Loading rules using Harbor.Tagd.Rules.FilesystemRuleProvider
[14:37:20 WRN] Running in report-only mode. To delete tags, run with --destructive
[14:37:20 INF] Connecting to https://harbor as admin
[14:37:20 INF] Running in report-only mode
[14:37:21 FTL] An Error was encountered while processing tags
Flurl.Http.FlurlHttpException: Call failed. An error occurred while sending the request. GET https://harbor/api/systeminfo ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Flurl.Http.FlurlRequest.<SendAsync>d__19.MoveNext()
   --- End of inner exception stack trace ---
   at Flurl.Http.FlurlRequest.<HandleExceptionAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Flurl.Http.FlurlRequest.<SendAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Flurl.Http.FlurlRequest.<SendAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Flurl.Http.HttpResponseMessageExtensions.<ReceiveJson>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Harbor.Tagd.API.HarborClient.<ProbeVersion>d__12.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/API/HarborClient.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Harbor.Tagd.API.HarborClient.<Login>d__13.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/API/HarborClient.cs:line 51
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Harbor.Tagd.TagEngine.<Process>d__9.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/TagEngine.cs:line 64
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Harbor.Tagd.TagEngine.<Process>d__9.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/TagEngine.cs:line 99
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Harbor.Tagd.TagEngine.<Process>d__9.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/TagEngine.cs:line 106
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Harbor.Tagd.Program.<DoClean>d__3.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/Program.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Harbor.Tagd.Program.<Main>d__2.MoveNext() in /root/Harbor.Tagd/src/Harbor.Tagd/Program.cs:line 98
nlowe commented

#15 added support for the --insecure-disable-certificate-validation flag. This will all you to run tagd against a registry with an untrusted certificate. You can also make your own docker image and install the CA certificate.