Skip to content

Using the CLI tool with ssh git remotes breaks _get_actions_url #19

@danielinniss

Description

@danielinniss

I'm using ssh git, e.g my remotes are configured as such

origin  [email protected]:zmkfirmware/zmk-cli.git (fetch)
origin  [email protected]:zmkfirmware/zmk-cli.git (push)

When running the command zmk dl it fails. download._get_actions_url is using the bare remote URL which cannot be opened by typer launch command. Adding an extra line to replace git ssh with git https addresses the issue

def _get_actions_url(repo: Repo):
    remote = repo.git("remote", capture_output=True).strip()
    remote_url = repo.git("remote", "get-url", remote, capture_output=True).strip()
    remote_url = remote_url.replace("[email protected]:", "https://github.com/").replace(".git", "")
    
    return f"{remote_url}/actions/workflows/build.yml"

#20

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