Use access token for pushing

This commit is contained in:
decentral1se 2021-06-05 22:54:16 +02:00
parent f4c2da894b
commit 743600b94e
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

View File

@ -4,7 +4,7 @@
#
# Mirror repositories to Github (Fuck M$, get it straight)
from os import chdir, listdir
from os import chdir, environ, listdir
from abralib import (
CLONES_PATH,
@ -31,10 +31,16 @@ def main():
log.info(f"Mirroring {app}...")
token = environ.get("GITHUB_ACCESS_TOKEN")
remote = (
f"https://decentral1se:{token}@github.com/Autonomic-Cooperative/{app}.git"
)
_run_cmd(
f"git remote add github git@github.com:Autonomic-Cooperative/{app}.git || true",
f"git remote add github {remote} || true",
shell=True,
)
_run_cmd("git push github --all")