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

git: allow scp-style urls without username #5293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 16, 2024

  1. git: allow scp-style urls without username

    According to the git docs:
    
    > Or you can use the shorter scp-like syntax for the SSH protocol:
    >
    > 	$ git clone [user@]server:project.git
    
    Previously, we were doing this potentially wrong - we were requiring the
    presence of a username for all scp-style URLs. This could result in
    disparity from the git CLI which successfully manages to parse
    `github.com:moby/buildkit.git` (though cloning will generally fail, with
    an ambiguous username).
    
    However, we aim keep the behavior of git ref as before - this is because
    making changes to this can effect the parsing of dockerfiles: where
    before "foo:bar" would be detected as a local source, after, it would be
    detected as a git repo (despite the fact it correctly parses as one). To
    avoid this, we simply keep this behavior as before.
    
    Signed-off-by: Justin Chadwell <[email protected]>
    jedevc committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    86e9c9c View commit details
    Browse the repository at this point in the history