Adding insecure-tls as environment variable?

We are using restic with a S3 repos which works great. Only little annoying thing is that we need to add --insecure-tls for every command we issue… As far as I can see, you cannot add this as an environment variable? Or maybe I missed it? And yes we know about Lets Encrypt etc. but for “some” reason this isn’t as easy as you think it is :slight_smile: So a way to make this easier would be nice…

:slight_smile:

/B

I think you’re right, there is no environment variable for an insecure option that’s not really meant to be used continously. Sorry :slight_smile:

@Beardmann welcome at the restic forum.

You did not provide the most details in your post. Are you working under linux? If yes then you may try to set an alias like

alias restic=’restic -–insecure-tls’

1 Like

I tried that… with not much luck…

server# alias restic=‘/usr/bin/restic -–insecure-tls’
server# restic -r s3:https://1.1.1.1:10443/backups snapshots

unknown shorthand flag: ‘â’ in -–insecure-tls

But if I do an “unalias restic” and run:

restic -–insecure-tls -r s3:https://1.1.1.1:10443/backups snapshots

It works… go figure? Maybe something about bash aliases I don’t understand?

If I do a:

server# type -a restic
restic is an alias for /usr/bin/restic -–insecure-tls
restic is /usr/bin/restic

Either by manual mistake or because of some autocorrect you entered two different characters here.

1 Like

…found the issue… seems that if you “copy/paste” from this forum the “-–” is interperted as something else… when I changed it “by hand”, it worked like a charm :slight_smile:

1 Like

Yeah indeed, copy paste from a browser directly to a command like that is always risky. There are editors like sublimeText that can be configured to always show you those pesky non-space invisible characters.