pygit2
pygit2 copied to clipboard
GitError: local push doesn't (yet) support pushing to non-bare repos.
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?