blob: c051c05f53931b7a7ef3c60ad60186536dfa8f8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Regression test for https://go.dev/issue/63845:
# If 'git ls-remote' fails for all secure protocols,
# we should fail instead of falling back to an arbitrary protocol.
#
# Note that this test does not use the local vcweb test server
# (vcs-test.golang.org), because the hook for redirecting to that
# server bypasses the "ping to determine protocol" logic
# in cmd/go/internal/vcs.
[!net:golang.org] skip
[!git] skip
[short] skip 'tries to access a nonexistent external Git repo'
env GOPRIVATE=golang.org
env CURLOPT_TIMEOUT_MS=100
env GIT_SSH_COMMAND=false
! go get -x golang.org/nonexist.git@latest
stderr '^git ls-remote https://golang.org/nonexist$'
stderr '^git ls-remote git\+ssh://golang.org/nonexist'
stderr '^git ls-remote ssh://golang.org/nonexist$'
! stderr 'git://'
stderr '^go: golang.org/nonexist.git@latest: no secure protocol found for repository$'
-- go.mod --
module example
go 1.19
|