mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 13:26:48 +00:00
A Git URL such as `ssh://git@[::1]/repo.git` supplies `[::1]` as its host. Adding the default SSH port currently produces `[[::1]]:22`, which cannot be dialed. Remove existing brackets before calling `net.JoinHostPort` when no port is present. Tests cover bracketed and bare IPv6 addresses, zone identifiers, explicit ports, IPv4, and hostnames. Signed-off-by: Alexandre Rodrigues <alexandre3ylf@gmail.com>