Skip to content
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

GitError: local push doesn't (yet) support pushing to non-bare repos. #1306

Open
creatormir opened this issue Jun 15, 2024 · 0 comments
Open

Comments

@creatormir
Copy link

creatormir commented Jun 15, 2024

I have changed a submodule and want to update the repository of this submodule.

    remote = 'origin'
    remote = repo.remotes[remote] 
    repo.config.get_global_config()['safe.directory'] = remote.url  
    res = remote.push(['refs/heads/temp'])

But I get an error: _pygit2.GitError: local push doesn't (yet) support pushing to non-bare repos.
At the same time, the console cmd is working: git push origin temp
How can I solve this problem via pygit2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant