Commit 0479c398 authored by Robin Fischer's avatar Robin Fischer

Modified git checkout using ssh

parent 4aea35c7
......@@ -32,7 +32,7 @@ targetDir = args.targetDir
validation = os.environ["CERTBOT_VALIDATION"]
token = os.environ["CERTBOT_TOKEN"]
domain = os.environ["CERTBOT_DOMAIN"]
gitToken = os.environ["TOKEN"]
#gitToken = os.environ["TOKEN"]
fileName = domain + ".html"
......@@ -59,10 +59,10 @@ def writeValidationFile():
def gitPush():
originUrl = shell("git remote get-url origin", targetDir)
writeOriginUrl = re.sub("gitlab-ci-token:.*?@", "gitlab-ci-token:" + gitToken + "@", originUrl)
print("Replaced for path: " + writeOriginUrl)
#writeOriginUrl = re.sub("gitlab-ci-token:.*?@", "gitlab-ci-token:" + gitToken + "@", originUrl)
#print("Replaced for path: " + writeOriginUrl)
shell("git remote add tokenOrigin " + writeOriginUrl, targetDir)
#shell("git remote add tokenOrigin " + writeOriginUrl, targetDir)
shell("git remote add sshOrigin git@gitlab.com:robinryf/robinryf.gitlab.io.git", targetDir)
shell("git checkout master", targetDir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment