import os, shutil from git import Repo token = os.getenv("githubpublictokenclassic") currentpath = "repo_directory" if os.path.exists(currentpath): shutil.rmtree(currentpath) os.mkdir(currentpath) Repo.clone_from('https://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:x-oauth-basic@github.com/zubairahmed-ai/IndexFilesWithGPT.git', currentpath)