mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-06-30 23:12:45 +00:00
[nix] fix the auth error
This commit is contained in:
parent
b35e023132
commit
04dc6f63f6
@ -16,6 +16,8 @@ from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from minio.credentials import Credentials, Static
|
||||
|
||||
from urllib3.util.retry import Retry
|
||||
|
||||
### Config
|
||||
@ -135,7 +137,8 @@ def download(url, dest):
|
||||
|
||||
download_dest.rename(dest)
|
||||
|
||||
client = minio.Minio('s3.amazonaws.com')
|
||||
credentials = Credentials(provider=Static())
|
||||
client = minio.Minio('s3.amazonaws.com', credentials=credentials)
|
||||
|
||||
def get_channels():
|
||||
return [
|
||||
|
@ -14,6 +14,8 @@ from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
from collections import defaultdict
|
||||
|
||||
from minio.credentials import Credentials, Static
|
||||
|
||||
from urllib3.util.retry import Retry
|
||||
|
||||
UPSTREAM_URL = os.getenv('TUNASYNC_UPSTREAM_URL', 'https://nixos.org/channels')
|
||||
@ -89,7 +91,8 @@ def download(url, dest):
|
||||
|
||||
download_dest.rename(dest)
|
||||
|
||||
client = minio.Minio('s3.amazonaws.com')
|
||||
credentials = Credentials(provider=Static())
|
||||
client = minio.Minio('s3.amazonaws.com', credentials=credentials)
|
||||
|
||||
def get_url(name):
|
||||
response = client.get_object('nix-channels', name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user