You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The --tls-client-cert option introduced by #1524 (in response to #1522) has a fatal flaw that causes it to attempt to read the value of ARGV[1] rather than the function argument, failing.
Output of restic version
restic 0.8.3
compiled with go1.10.1 on linux/amd64
open --tls-client-cert: no such file or directory
ReadFile
github.com/restic/restic/internal/backend.readPEMCertKey
/build/restic/src/src/github.com/restic/restic/internal/backend/http_transport.go:33
github.com/restic/restic/internal/backend.Transport
/build/restic/src/src/github.com/restic/restic/internal/backend/http_transport.go:83
main.open
/build/restic/src/restic-0.8.3/cmd/restic/global.go:550
main.OpenRepository
/build/restic/src/restic-0.8.3/cmd/restic/global.go:328
main.runList
/build/restic/src/restic-0.8.3/cmd/restic/cmd_list.go:34
main.glob..func12
/build/restic/src/restic-0.8.3/cmd/restic/cmd_list.go:21
github.com/spf13/cobra.(*Command).execute
/build/restic/src/src/github.com/spf13/cobra/command.go:698
github.com/spf13/cobra.(*Command).ExecuteC
/build/restic/src/src/github.com/spf13/cobra/command.go:783
github.com/spf13/cobra.(*Command).Execute
/build/restic/src/src/github.com/spf13/cobra/command.go:736
main.main
/build/restic/src/restic-0.8.3/cmd/restic/main.go:69
runtime.main
/usr/lib/go/src/runtime/proc.go:198
runtime.goexit
/usr/lib/go/src/runtime/asm_amd64.s:2361
What backend/server/service did you use to store the repository?
No pre-existing repository is required, however you must pass a backend argument that would use the HTTP backend.
Expected behavior
I expected it to read the file ./test.pem
Actual behavior
It attempted to read a file named --tls-client-cert
Steps to reproduce the behavior
No advanced setup, you don't even need to have a certificate file or backend configured. Simply running restic --tls-client-cert somefile -r rest:https://somewhere snapshots is enough.
Previously, the function read from ARGV[1] (hardcoded) rather than the
value passed to it, the command-line argument as it exists in globalOptions.
Resolvesrestic#1745
The
--tls-client-cert
option introduced by #1524 (in response to #1522) has a fatal flaw that causes it to attempt to read the value of ARGV[1] rather than the function argument, failing.Output of
restic version
How did you run restic exactly?
restic --tls-client-cert ./test.pem -r rest:https://my.server/restic/test snapshots
What backend/server/service did you use to store the repository?
No pre-existing repository is required, however you must pass a backend argument that would use the HTTP backend.
Expected behavior
I expected it to read the file
./test.pem
Actual behavior
It attempted to read a file named
--tls-client-cert
Steps to reproduce the behavior
No advanced setup, you don't even need to have a certificate file or backend configured. Simply running
restic --tls-client-cert somefile -r rest:https://somewhere snapshots
is enough.Do you have any idea what may have caused this?
Yes. (c34db98)
Do you have an idea how to solve the issue?
Yes
Did restic help you or made you happy in any way?
Always. Although overlooking silly mistakes like this makes me sad.
The text was updated successfully, but these errors were encountered: