stylianosnicoletti / dotnet-certificate-tool

Command line tool to install and remove certificates from the current user's store.
https://www.nuget.org/packages/dotnet-certificate-tool
Apache License 2.0
109 stars 28 forks source link

ArgumentOutOfRangeException: Specified argument was out of the range of valid values. #17

Closed shanefsl closed 3 years ago

shanefsl commented 3 years ago

I'm getting this error with the sample project (and my actual project) after running: docker run -v /tmp:/app/tmp docker-example --cert_filepath /app/tmp/cert.pfx --cert_password 'mypassword' --cert_thumbprint ''.

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'value') at CommandLine.Text.HelpText.AddLine(StringBuilder builder, String value, Int32 maximumLength) at CommandLine.Text.HelpText.AddPreOptionsLine(String value, Int32 maximumLength) at CommandLine.Text.HelpText.AddPreOptionsLine(String value) at CommandLine.Text.HelpText.DefaultParsingErrorsHandler[T](ParserResult1 parserResult, HelpText current) at CommandLine.Text.HelpText.<>c__DisplayClass39_01.b2(HelpText current) at CommandLine.Text.HelpText.AutoBuild[T](ParserResult1 parserResult, Func2 onError, Func2 onExample, Boolean verbsIndex, Int32 maxDisplayWidth) at CommandLine.Text.HelpText.AutoBuild[T](ParserResult1 parserResult, Int32 maxDisplayWidth) at CommandLine.Parser.<>cDisplayClass17_01.<DisplayHelp>b__1(IEnumerable1 _, TextWriter writer) at CSharpx.MaybeExtensions.Do[T1,T2](Maybe1 maybe, Action2 action) at CommandLine.Parser.<>c__DisplayClass17_01.<DisplayHelp>b__0(IEnumerable1 errors) at CommandLine.ParserResultExtensions.WithNotParsed[T](ParserResult1 result, Action1 action) at CommandLine.Parser.DisplayHelp[T](ParserResult1 parserResult, TextWriter helpWriter, Int32 maxDisplayWidth) at CommandLine.Parser.MakeParserResult[T](ParserResult1 parserResult, ParserSettings settings) at CommandLine.Parser.ParseArguments(IEnumerable1 args, Type[] types) at CommandLine.ParserExtensions.ParseArguments[T1,T2](Parser parser, IEnumerable1 args) at GSoft.CertificateTool.Program.Main(String[] args) in /Users/yohan.belval/git/dotnet-certificate-tool/src/Program.cs:line 31 ./docker-entrypoint.sh: line 36: 8 Aborted ./certificate-tool add -f ${cert_filepath} -t ${cert_thumbprint} -p ${cert_password} The following 0 certificate(s) are installed:

Any ideas? I can't see anything wrong with the values I'm putting in (or if there is, it's not a very friendly error message...)

yohanb commented 3 years ago

Hi @shanefsl, thanks for the issue. Forgot to update the docker example since I removed the need for the thumbprint on the install. Should be good now.