Remove token
This commit is contained in:
parent
35f6553d15
commit
dc5455ec6c
1 changed files with 6 additions and 2 deletions
|
@ -1,10 +1,14 @@
|
||||||
import base64, requests
|
import base64, requests, sys, os
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
|
token = os.getenv("GITEA_TOKEN")
|
||||||
|
if not token:
|
||||||
|
print("please specify a token")
|
||||||
|
sys.exit(1)
|
||||||
s.headers = {
|
s.headers = {
|
||||||
"Authorization": "token ***REMOVED***",
|
"Authorization": f"token {token}",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
}
|
}
|
||||||
res = s.get("https://git.augendre.info/api/v1/repos/search?limit=100")
|
res = s.get("https://git.augendre.info/api/v1/repos/search?limit=100")
|
||||||
|
|
Loading…
Reference in a new issue