Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielinniss opened this issue Jan 31, 2025 · 0 comments
Open

Comments

@danielinniss
Copy link

danielinniss commented Jan 31, 2025

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

@danielinniss danielinniss changed the title Using the CLI tool with ssh git remotes breaks url actions Using the CLI tool with ssh git remotes breaks _get_actions_url Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant