Skip to content

Cannot fetch unless a remote is defined #1060

Open
@basak

Description

@basak

Hi,

Thank you for pygit2! I'm using it extensively for git tooling in Ubuntu, but occasionally I find some corner where a feature doesn't exist and I have to resort to calling a git subprocess.

The git CLI allows me to use git fetch without having a remote defined. I can just specify a URL. I can't find any documentation on this in pygit2 though. It looks like I have to define a remote, with a name, first. Since I don't necessarily own the repository, this requires an ugly workaround because I have to be concerned about name collisions, crashing without having removed a temporary remote, etc.

Any chance of adding API functionality to fetch (and presumably) push against remotes with just a URL and no mandatory repository configuration please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions