Skip to content

Commit 442d3b4

Browse files
committed
fix(git): strip controller port when parsing git remotes
1 parent 7f857e5 commit 442d3b4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

client/pkg/git/git.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ func findRemote(host string) (string, error) {
9393

9494
cmd := string(out)
9595

96+
// Strip off any trailing :port number after the host name.
97+
host = strings.Split(host, ":")[0]
98+
9699
for _, line := range strings.Split(cmd, "\n") {
97100
for _, remote := range strings.Split(line, " ") {
98101
if strings.Contains(remote, host) {

0 commit comments

Comments
 (0)