github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_get_svn.txt (about) 1 [!net] skip 2 [!exec:svn] skip 3 4 # 'go get' will fall back to svn+ssh once svn fails over protocols like https. 5 # If vcs-test.golang.org isn't in the user's known_hosts file, this will result 6 # in an ssh prompt, which will stop 'go test' entirely 7 # 8 # Unfortunately, there isn't a way to globally disable host checking for ssh, 9 # without modifying the real system's or user's configs. Changing $HOME won't 10 # affect ssh either, as it ignores the environment variable entirely. 11 # 12 # However, a useful trick is pointing SVN_SSH to a program that doesn't exist, 13 # resulting in svn skipping ssh entirely. Alternatives like 14 # SVN_SSH="ssh -o StrictHostKeyChecking=no" didn't avoid the prompt. 15 env SVN_SSH="svn_do_not_use_ssh" 16 17 env GO111MODULE=on 18 env GOPROXY=direct 19 env GOSUMDB=off 20 21 # Attempting to get a module zip using svn should succeed. 22 go get vcs-test.golang.org/svn/hello.svn@000000000001 23 exists $GOPATH/pkg/mod/cache/download/vcs-test.golang.org/svn/hello.svn/@v/v0.0.0-20170922011245-000000000001.zip 24 exists $GOPATH/bin/hello.svn$GOEXE 25 26 # Attempting to get a nonexistent module using svn should fail with a 27 # reasonable message instead of a panic. 28 ! go get -d vcs-test.golang.org/svn/nonexistent.svn 29 ! stderr panic 30 stderr 'go get vcs-test.golang.org/svn/nonexistent.svn: no matching versions for query "upgrade"' 31 32 -- go.mod -- 33 module golang/go/issues/28943/main 34 -- go.sum -- 35 vcs-test.golang.org/svn/hello.svn v0.0.0-20170922011245-000000000001 h1:rZjvboXMfQICKXdhx/QHqJ2Y/AQsJVrXnwGqwcTxQiw= 36 vcs-test.golang.org/svn/hello.svn v0.0.0-20170922011245-000000000001/go.mod h1:0memnh/BRLuxiK2zF4rvUgz6ts/fhhB28l3ULFWPusc=