You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, this is the code i have been using for quite some time to update my project from github, coming back to my project after some months it appears github may have changed their api, as using ghp [email protected] no longer works, it prompts me for a password, and then states Support for password authentication was removed on August 13, 2021.
could someone please provide me with the correct way to do this?
def clone_and_replace_repository():
git.Repo.clone_from(f"https://{config['repository']['token']}@github.com/{config['repository']['path']}.git", 'temp_repo')
for root, dirs, files in os.walk('temp_repo'):
if '.git' in dirs:
dirs.remove('.git')
for file in files:
src_file = os.path.join(root, file)
dest_file = os.path.relpath(src_file, 'temp_repo')
shutil.copy(src_file, dest_file)
shutil.rmtree('temp_repo')
print("Repository cloned and files replaced successfully.")
```
The text was updated successfully, but these errors were encountered:
Hello, this is the code i have been using for quite some time to update my project from github, coming back to my project after some months it appears github may have changed their api, as using ghp [email protected] no longer works, it prompts me for a password, and then states Support for password authentication was removed on August 13, 2021.
could someone please provide me with the correct way to do this?
The text was updated successfully, but these errors were encountered: