Spaces:
Sleeping
Sleeping
Nicky Nicolson
commited on
Commit
·
7822dce
1
Parent(s):
d5650cb
mod creation of request headers
Browse files- downloadartifact.py +2 -1
downloadartifact.py
CHANGED
@@ -13,7 +13,8 @@ def getArtifact(artifactUrl, gh_tokenfile, outputfile):
|
|
13 |
with open(gh_tokenfile, 'r') as f:
|
14 |
gh_token = f.read()
|
15 |
print('Read token of length {}'.format(len(gh_token)))
|
16 |
-
headers = {'Authorization': 'Bearer: {}'.format(gh_token)}
|
|
|
17 |
r = requests.get(artifactUrl, headers=headers)
|
18 |
if r.status_code == 200:
|
19 |
with open(outputfile, mode="wb") as file:
|
|
|
13 |
with open(gh_tokenfile, 'r') as f:
|
14 |
gh_token = f.read()
|
15 |
print('Read token of length {}'.format(len(gh_token)))
|
16 |
+
# headers = {'Authorization': 'Bearer: {}'.format(gh_token)}
|
17 |
+
headers = {'Authorization': f'token {gh_token}'}
|
18 |
r = requests.get(artifactUrl, headers=headers)
|
19 |
if r.status_code == 200:
|
20 |
with open(outputfile, mode="wb") as file:
|