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

flux bootstrap git won't accept scp-style URLs #5015

Open
1 task done
judge-red opened this issue Sep 30, 2024 · 0 comments
Open
1 task done

flux bootstrap git won't accept scp-style URLs #5015

judge-red opened this issue Sep 30, 2024 · 0 comments

Comments

@judge-red
Copy link

judge-red commented Sep 30, 2024

Describe the bug

There are a number of ways in which SSH URLs can be formatted, one of them is in "scp-style": hostname:group/repo.git, sometimes also written as ssh://hostname:group/repo.git, although the latter isn't to spec.

Unfortunately, flux bootstrap git can handle neither of these.

$ flux bootstrap git --url="user@hostname:group/repo.git"
✗ parse "user@hostname:group/repo.git": first path segment in URL cannot contain colon
$ flux bootstrap git --url="ssh://user@hostname:group/repo.git"
✗ parse "ssh://user@hostname:group/repo.git": invalid port ":sck" after host

Meanwhile, git clone and (other) remote-modifying git commands work with both these urls. For reference, GitHub uses the former and GitLab the latter format, so they're both very established and all tools but Flux support them.

Steps to reproduce

  1. flux bootstrap git --url="<repo url in scp-style format>"

Expected behavior

Works like ssh urls in non-scp-style format

Screenshots and recordings

No response

OS / Distro

macos (arm)

Flux version

flux: v2.3.0

Flux check

► checking prerequisites
✔ Kubernetes 1.29.9 >=1.28.0-0
► checking version in cluster
✗ checking failed: customresourcedefinitions.apiextensions.k8s.io "gitrepositories.source.toolkit.fluxcd.io" not found
► checking controllers
✗ no controllers found in the 'flux-system' namespace with the label selector 'app.kubernetes.io/part-of=flux'
► checking crds
✗ no crds found with the label selector 'app.kubernetes.io/part-of=flux'
✗ check failed

Git provider

No response

Container Registry provider

No response

Additional context

From the git-clone manpage's git urls section:

An alternative scp-like syntax may also be used with the ssh protocol:
[<user>@]<host>:/<path-to-git-repo>

Code of Conduct

  • I agree to follow this project's Code of Conduct
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