在公司网络上变得不安全

标签 go

C:\Users\me
> go get -insecure github.com/denisenkom/go-mssqldb
# cd .; git clone https://github.com/denisenkom/go-mssqldb C:\Users\me\Projects\Go\src\github.com\denisenkom\go-mssqldb
Cloning into 'C:\Users\me\Projects\Go\src\github.com\denisenkom\go-mssqldb'...
fatal: unable to access 'https://github.com/denisenkom/go-mssqldb/': SSL certificate problem: unable to get local issuer certificate
package github.com/denisenkom/go-mssqldb: exit status 128

根据 go help get这个连接应该下降到http?是的?我误会了吗?我如何让它在没有 https 的情况下工作?

PS:我对尝试修复 https 不感兴趣(在这个 Win10 图像上我无论如何都无法控制)-我已经与 npm 进行了那场战斗并失去了...

编辑:我通过修复全局 git 配置找到了一个可行的答案。我讨厌这样做,但必须…… atom.io/go-plus 似乎没有接受此配置更改,我将 ping 作者。
C:\Users\me
> git config --global http.sslVerify false

最佳答案

2021 年第二季度更新:新增 released Go 1.17 (beta) ,您现在拥有,for deprecations :

go get

The go get -insecure flag is deprecated and has been removed.

To permit the use of insecure schemes when fetching dependencies, please use the GOINSECURE environment variable.
The -insecure flag also bypassed module sum validation, use GOPRIVATE or GONOSUMDB if you need that functionality.
See go help environment for details.

关于在公司网络上变得不安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45331743/

相关文章:

linux - 无法使用 golang 执行 sh 脚本 - 权限被拒绝

go - 如何理解以下有关golang slice的代码?

json - 将 _id 解码为 id 不起作用

go - 如何跳过失败的测试

go - 在 Go 中更改结构类型

map - 传递结构中的 Go 映射

java - 提交到 SQS 时有关将消息自动编码为 base64 的规则

戈朗 : how to cast []string to a typed struct?

go - 无法从 client-go -/serviceaccount/token : no such file 连接到 kubectl

html - Golang - HTML 模板 - 范围限制