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

BORG_PASSPHRASE not working as expected #67

Open
barnybla opened this issue Feb 25, 2025 · 5 comments
Open

BORG_PASSPHRASE not working as expected #67

barnybla opened this issue Feb 25, 2025 · 5 comments

Comments

@barnybla
Copy link

barnybla commented Feb 25, 2025

I have set environment variable for BORG_PASSPHRASE, in this way:

export BORG_PASSPHRASE='top_secret_passphrase'

I got this issue:

passphrase supplied in BORG_PASSPHRASE, by BORG_PASSCOMMAND or via BORG_PASSPHRASE_FD is incorrect

With the command: "env" I saw:

BORG_PASSPHRASE=top_secret_passphrase

I tried the export in different ways with: 'top_secret_passphrase', "top_secret_passphrase" and top_secret_passphrase. All ways shows the same issue like above.

If I try the borg list command with the right passphrase, then it works fine.

I have:

borg --version                           borg 1.2.4
borgmatic --version                  borgmatic 1.9.5
python3 --version                     Python 3.11.2

What could be the problem?

Regards Bernd

@rugk
Copy link
Contributor

rugk commented Feb 25, 2025

I guess you're in the wrong repo here, you'd better post this depending on which (community) tool you actually use.

Also I'd suggest using proper Markdown formatting available on GitHub, including for code blocks/console commands respectively it's output. This makes your post much more readable, and generally contributes to how a good question should be asked.

@ThomasWaldmann
Copy link
Member

Usually such issues are because the borg process does not "see" the env variable.

Either because export was not used (not in your case), or because sudo or some other wrapper does not let it through. Or the passphrase in the env is just wrong.

@barnybla
Copy link
Author

thanks for your answers,
First, the passphrase in the env is the right one, the command is running under root. Is it possible that borgmatic is blocking that?

@ThomasWaldmann
Copy link
Member

I don't think so. Maybe @witten can comment?

@ThomasWaldmann ThomasWaldmann changed the title Wrong environment variable BORG_PASSPHRASE not working as expected Mar 1, 2025
@witten
Copy link

witten commented Mar 1, 2025

If the problem only occurs when using borgmatic, then I recommend filing an issue here instead: https://torsion.org/borgmatic/#issues

Please include your borgmatic configuration (redacted) and the logs you get when running with --verbosity 2 (also redacted if necessary). Thanks.

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

No branches or pull requests

4 participants