node.js - gnutls_handshake() 失败:关闭通知 - Docker 且仅在一个网络上
问题描述
刚刚遇到一个非常奇怪的问题。
我一直在使用 Docker 映像和 Dockerfile 进行一些工作,其中包括一些 bower 安装命令。一切都很好,直到今天我有了一个新的宽带提供商(英国的 Virgin Media),突然间我开始在尝试构建图像时遇到错误,例如
bower ember#1.13.12 ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/components/ember.git", exit code of #128 fatal: unable to access 'https://github.com/components/ember.git/': gnutls_handshake() failed: Close notify
Additional error details:
fatal: unable to access 'https://github.com/components/ember.git/': gnutls_handshake() failed: Close notify
然后我尝试连接到我的手机(4g),它工作得很好。所以 bower.json 中有很多命令,它似乎随机失败。
即使是像从 Dockerfile 中克隆 repo 这样的简单命令,当我连接到我的新网络但与其他网络一起使用时也会失败。
奇怪的是,如果我在我的 Mac 上使用 git clone 命令,甚至使用完全相同的 repo 安装 bower,它都可以正常工作(使用新网络和 4G),但是一旦我尝试通过 Dockerfile 运行,我就会得到错误。
我检查了我的路由器,但无法真正看出它是否是路由器问题。WIFI信号是200Mbs,所以肯定不可能。
解决方案
由于 git 使用的协议而引发错误。只需将“https”替换为“http”,它适用于我的情况。
推荐阅读
- javascript - 如何解决状态码为 500 axios 的空错误?
- c - 使用 I2C 读写时遇到问题
- python-3.x - json.decoder.JSONDecodeError:期望值:第 1 行第 1 列(字符 0)和 204 响应
- python - 使用列表理解简化 for 循环和 if 语句
- vb.net - 反序列化 Json 以获得多语言支持
- reactjs - Bootstrap 4 flex容器调整到视口大小以创建不换行或溢出到下一行?
- python-3.x - 在推特上打开链接
- r - 在 R 中拆分数据框列
- swift - 可以在结构(而不是类)中使用组合吗?
- python - 在遍历它时从熊猫数据框中删除行