Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

GHP Authentication no longer working #1800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lunarmaniac opened this issue Jan 12, 2024 · 0 comments
Closed

GHP Authentication no longer working #1800

lunarmaniac opened this issue Jan 12, 2024 · 0 comments

Comments

@lunarmaniac
Copy link

lunarmaniac commented Jan 12, 2024

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.")
    ```
@gitpython-developers gitpython-developers locked and limited conversation to collaborators Jan 12, 2024
@Byron Byron converted this issue into discussion #1801 Jan 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

1 participant