Day2-go搭载vscode出现的问题

git bush的时候出现的问题

1.报了这个错:fatal: unable to access 'https://github.com/.......': OpenSSL SSL_read: Connection was reset, errno 10054

产生原因:一般是这是因为服务器的SSL证书没有经过第三方机构的签署,所以才报错

参考网上解决办法:解除ssl验证后,再次git即可

git config --global http.sslVerify "false"

2.Go下载模块提示连接失败dial tcp 142.251.42.241:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

解决办法

①查看go env中的GOSUMDB变量

go env

 ②关闭GOSUMDB

go env -w GOSUMDB=off

 ③设置代理为https://goproxy.cn,direct

go env -w GOPROXY=https://goproxy.cn,direct

 ④再次下载

 3.报错go.mod file not found in current directory or any parent directory

将 GO111MODULE 设置为 auto,以便仅当 go.mod 文件存在于当前目录或任何父目录中时,才启用模块感知模式。

go env -w GO111MODULE=auto

4.fatal: unable to access 'https://github.com/.../.git': Could not resolve host: github.com 

这里我给的都是https所以直接用第二个命令就好 

git config --global --unset http.proxy 
git config --global --unset https.proxy

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大熊的饲养员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值