pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

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

Open creatormir opened this issue 1 year ago • 0 comments

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?

creatormir avatar Jun 15 '24 02:06 creatormir