Open bopolissimus opened 8 years ago
passphrase = os.environ.get('ATTIC_PASSPHRASE')
if passphrase is None:
passphrase = getpass(prompt) # this is line 187
That means you did not set ATTIC_PASSPHRASE. If you did, it would not execute that line.
Thank you Thomas. After further investigation, I had a misunderstanding about how exporting a variable in a sourced script. The variable would be available to subshells, but not to the calling shell :-). I've changed how the attic passphrase env variable is initialized and it's now available to attic check.
I was confused since there was this:
Starting repository check...
Repository check complete, no problems found.
I'd assumed that repository check would also require the passphrase. but it looks like it doesn't since that succeeded and only the archive checks failed.
I run attic check from cron (daily while testing, once a week in future). Attic uses a $ATTIC_PASSPHRASE set in the environment. This is running from cron.
attic check does the repository check OK but when it does the archive consistency check it fails with:
Is this a known issue and is there a command line parameter or environment variable or similar that I can set to make getpass.py not break when it thinks it's not talking to a terminal?
I think I could possibly get this working if I set up ssh key auth and have the cron job ssh to localhost to run attic-check. I'll test that (haven't yet) if there is no more standard way to fix.
Gerald Quimpo