Skip to content

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

@creatormir

Description

@creatormir

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions