Remove token

This commit is contained in:
Gabriel Augendre 2022-01-01 22:50:34 +01:00
parent 35f6553d15
commit dc5455ec6c

View file

@ -1,10 +1,14 @@
import base64, requests
import base64, requests, sys, os
def main():
s = requests.Session()
token = os.getenv("GITEA_TOKEN")
if not token:
print("please specify a token")
sys.exit(1)
s.headers = {
"Authorization": "token ***REMOVED***",
"Authorization": f"token {token}",
"Accept": "application/json",
}
res = s.get("https://git.augendre.info/api/v1/repos/search?limit=100")