Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Ignore TLS Error #193

Open
federicotravaini opened this issue May 23, 2024 · 6 comments
Open

Unable to Ignore TLS Error #193

federicotravaini opened this issue May 23, 2024 · 6 comments
Labels

Comments

@federicotravaini
Copy link

I am encountering an issue with configuring Restic within a Docker container to ignore TLS errors. My setup involves using Rclone configured with Nextcloud via WebDAV. When I use Rclone directly on the host server (Ubuntu), I am able to bypass the TLS error by ignoring it. However, when attempting to use Rclone within resticker Docker container, I am unable to find a way to ignore the TLS error.

The problem arises because Restic treats the --insecure-tls parameter as a global parameter rather than a parameter specific to the backup command. As a result, I cannot pass the --insecure-tls flag directly to the backup command when running Restic within the Docker container.

Is there a workaround that does not involve having the certificate?

@djmaze
Copy link
Owner

djmaze commented Jun 9, 2024

Sorry for the late response. I think this is an upstream problem in restic and should be reported over there.

Oops, I think I did not read the question thoroughly. Where did you try to specify the parameter for the docker container?

@O6ACDXl-6sET9zJ

This comment was marked as spam.

@O6ACDXl-6sET9zJ

This comment was marked as spam.

@domiko96
Copy link

domiko96 commented Sep 21, 2024

Hey there,
I can imagine that the issue is actually that one can only pass in the --ignore-tls argument to the individual actions like so:

RESTIC_BACKUP_ARGS: >-
        --tag docker-volumes
        --verbose
        --insecure-tls

I for example run into this error with minio.
In my case I'm running minio on my NAS at home and connect a server I want to backup via vpn.

The docker logs looks like this:

Checking configured repository 's3://my-domain.com:9000/restic' ...
Fatal: unable to open config file: Stat: Get "https://my-domain.com:9000/restic/?location=": tls: failed to verify certificate: x509: certificate is valid for localhost, not my-domain.com
Is there a repository at the following location?
s3://my-domain.com:9000/restic
Could not access the configured repository.
Trying to initialize (in case it has not been initialized yet) ...
Fatal: create repository at s3://my-domain.com:9000/restic failed: client.BucketExists: Get "https://my-domain.com/restic/?location=": tls: failed to verify certificate: x509: certificate is valid for localhost, not my-domain.com

I guess a global parameter to set --insecure-tls would maybe make sense? Or is there a trick I'm missing?
I'll try to mitigate it by SKIP_INIT.

Any help is much appreciated. Keep up the great work!

@domiko96
Copy link

I confirmed I can bypass the issues with SKIP_INIT for the backup container.

However in my prune container I get errors even though I also pass

      PRUNE_ARGS: >-
        --insecure-tls

Error is: tls: failed to verify certificate: x509: certificate is valid for localhost, not my-domain.com

@domiko96
Copy link

I confirmed I can bypass the issues with SKIP_INIT for the backup container.

However in my prune container I get errors even though I also pass

      PRUNE_ARGS: >-
        --insecure-tls

Error is: tls: failed to verify certificate: x509: certificate is valid for localhost, not my-domain.com

Ah actually this is all fine it just has to be RESTIC_PRUNE_ARGS instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants