Commit Graph

9 Commits (master)

Author SHA1 Message Date
Sebastiaan van Stijn 314bedc808
util/sshutil: minor linting / warning nits
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-01 17:01:15 +01:00
Alex Couture-Beil 3a5bdf0710 Move prefix check to isGitTransport
- rename IsSSHTransport to IsImplicitSSHTransport
- add testing for NewGitIdentifier

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-01-04 11:09:56 -08:00
Alex Couture-Beil 0dff0fdab4 Check for explicit ssh git URL
- fix IsSSHTransport to also check for explicitly-defined ssh-based git repos

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-15 13:31:35 -08:00
Tibor Vass fbf8ed15a8 sshutil: allow uppercase usernames (thinking of you thaJeztah)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-11 05:19:39 +00:00
Alex Couture-Beil 201482bba9 Allow for usersnames with hyphens or underscores
- usernames could have - or _
- expand testing cases

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Alex Couture-Beil 3fa063dcf3 move ssh regexp test to common location
- include testing
- improve hostname checking

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Alex Couture-Beil 88580ad989 Fix sshkeyscan to work with ipv6
- make use of standard net.SplitHostPort and net.JoinHostPort functions

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-18 09:19:49 -08:00
Alex Couture-Beil ccac4d664e fix assumption that ssh port must be 2 digits
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-16 17:02:40 -08:00
Alex Couture-Beil 3c73a22430 Add default ssh mount and keyscans when missing
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-16 13:23:37 -08:00