[GH-ISSUE #263] Bugfix: ArchiveBox ignoring config values via environment variable and ArchiveBox.conf #1697

Closed
opened 2026-03-01 17:52:58 +03:00 by kerem · 8 comments
Owner

Originally created by @LaserWires on GitHub (Sep 6, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/263

Downloading sites without enforcing SSL verification doesen't function

CHECK_SSL_VALIDITY=false

does not permit user to download from site with outdated or incorrectly setup certificates.

[!] Failed to download https://site-with-ssl-issue.com
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)>

ArchiveBox.conf.default.txt

Aliasing in ~/.bashrc did not resolve the issue with ArchiveBox SSL verification.

alias wget='wget --no-check-certificate'
alias curl='curl -k'

Originally created by @LaserWires on GitHub (Sep 6, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/263 Downloading sites without enforcing SSL verification doesen't function > CHECK_SSL_VALIDITY=false does not permit user to download from site with outdated or incorrectly setup certificates. > [!] Failed to download https://site-with-ssl-issue.com > <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)> [ArchiveBox.conf.default.txt](https://github.com/pirate/ArchiveBox/files/3587144/ArchiveBox.conf.default.txt) Aliasing in ~/.bashrc did not resolve the issue with ArchiveBox SSL verification. > alias wget='wget --no-check-certificate' > alias curl='curl -k'
kerem closed this issue 2026-03-01 17:52:58 +03:00
Author
Owner

@LaserWires commented on GitHub (Sep 10, 2019):

CHECK_SSL_VALIDITY malfunctions regardless of file location.

It only downloads sites with SSL issues when line in archivebox/config.py

CHECK_SSL_VALIDITY = os.getenv('CHECK_SSL_VALIDITY', 'False' ).lower() == 'False'

is modified

<!-- gh-comment-id:530110259 --> @LaserWires commented on GitHub (Sep 10, 2019): CHECK_SSL_VALIDITY malfunctions regardless of file location. It only downloads sites with SSL issues when line in **archivebox/config.py** > CHECK_SSL_VALIDITY = os.getenv('CHECK_SSL_VALIDITY', 'False' ).lower() == 'False' is modified
Author
Owner

@pirate commented on GitHub (Sep 19, 2019):

Can you verify that the environment variable is actually making it to archivebox by adding a line that line to print:

print('CHECK_SSL_VALIDITY=', os.getenv('CHECK_SSL_VALIDITY', 'UNSET'))

Or by running archivebox config --get=CHECK_SSL_VALIDITY.

<!-- gh-comment-id:532913545 --> @pirate commented on GitHub (Sep 19, 2019): Can you verify that the environment variable is actually making it to archivebox by adding a line that line to print: ```python3 print('CHECK_SSL_VALIDITY=', os.getenv('CHECK_SSL_VALIDITY', 'UNSET')) ``` Or by running `archivebox config --get=CHECK_SSL_VALIDITY`.
Author
Owner

@LaserWires commented on GitHub (Sep 19, 2019):

Outputs CHECK_SSL_VALIDITY= UNSET

This is likely identical culprit to bug https://github.com/pirate/ArchiveBox/issues/268

<!-- gh-comment-id:532926385 --> @LaserWires commented on GitHub (Sep 19, 2019): Outputs **CHECK_SSL_VALIDITY= UNSET** This is likely identical culprit to bug https://github.com/pirate/ArchiveBox/issues/268
Author
Owner

@pirate commented on GitHub (Sep 19, 2019):

Going to close the other issue and rename this one, since it seems to be a generic issue with config handling.

<!-- gh-comment-id:532931172 --> @pirate commented on GitHub (Sep 19, 2019): Going to close the other issue and rename this one, since it seems to be a generic issue with config handling.
Author
Owner

@pirate commented on GitHub (Sep 19, 2019):

Do you mind posting the full output of archivebox version and archivebox config, and the exact command you're using to run archivebox.

<!-- gh-comment-id:532931488 --> @pirate commented on GitHub (Sep 19, 2019): Do you mind posting the full output of `archivebox version` and `archivebox config`, and the exact command you're using to run archivebox.
Author
Owner

@LaserWires commented on GitHub (Sep 19, 2019):

From git

git clone https://github.com/pirate/ArchiveBox

$ ./archive version
ArchiveBox version b7ea44a1e

Config files are identical

~/.ArchiveBox.conf
ArchiveBox/etc/ArchiveBox.conf.default

To archive

./archive http://www.site-to-archive.com

<!-- gh-comment-id:532969538 --> @LaserWires commented on GitHub (Sep 19, 2019): From git `git clone https://github.com/pirate/ArchiveBox` ``` $ ./archive version ArchiveBox version b7ea44a1e ``` Config files are identical ``` ~/.ArchiveBox.conf ArchiveBox/etc/ArchiveBox.conf.default ``` To archive `./archive http://www.site-to-archive.com`
Author
Owner

@pirate commented on GitHub (Sep 19, 2019):

Ah I thought you were running the v0.4 branch. The current version on master actually doesn't support config files at all, it's all done via environment variables, so you'd have to source your config file before running the command manually.

source ~/.ArchiveBox.conf
echo $CHECK_SSL_VALIDITY
./archive http://www.site-to-archive.com

Can you confirm that that outputs false before archivebox starts.

<!-- gh-comment-id:532984262 --> @pirate commented on GitHub (Sep 19, 2019): Ah I thought you were running the v0.4 branch. The current version on master actually doesn't support config files at all, it's all done via environment variables, so you'd have to source your config file before running the command manually. ```bash source ~/.ArchiveBox.conf echo $CHECK_SSL_VALIDITY ./archive http://www.site-to-archive.com ``` Can you confirm that that outputs `false` before archivebox starts.
Author
Owner

@LaserWires commented on GitHub (Sep 19, 2019):

There is no issue any longer, setting environment variables works really well including for disabling media downloads.

$ source ~/.ArchiveBox.conf 
$ echo $CHECK_SSL_VALIDITY
False

Would be nice to define link depth and media specific objects.

<!-- gh-comment-id:533012746 --> @LaserWires commented on GitHub (Sep 19, 2019): There is no issue any longer, setting environment variables works really well including for disabling media downloads. ``` $ source ~/.ArchiveBox.conf $ echo $CHECK_SSL_VALIDITY False ``` Would be nice to define link depth and media specific objects.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1697
No description provided.