docker - 获取 https://ghrc.io/v2/:net/http: 等待连接时取消请求(等待标头时超出 Client.Timeout)
问题描述
我正在使用 github 操作来构建我的图像并将其推送到 github 注册表。
这是我的部署文件,
name: Build and Push
on:
push:
branches:
- develop
jobs:
build_and_push_to_github_registry:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: .
push: true
target: dev
tags: ghrc.io/ownerin/customer-service-backend:${{ github.sha }}
这里的所有者是OwnerIN
大写字母,但标签不支持大写字母,所以我正在使用ownerin
但是当作业运行时,我得到以下错误。构建成功,推送步骤发生错误。
...
pushing ghrc.io/ownerin/customer-service-backend:0679931b537b724ca21e6ef53178d4bf0725b4b5 with docker:
error: Get https://ghrc.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Error: buildx call failed with: error: Get https://ghrc.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
我按照文档和 repo 描述了here
解决方案
域名是 ghcr.io(GitHub Container Registry 的缩写),而不是 ghrc.io。这是一个错字,您正在尝试将容器映像推送到 Internet 上的未知主机。
推荐阅读
- javascript - 节点获取映射错误 - 无法读取未定义的属性“映射””
- javascript - 如何点击div下的元素?
- r - 使用单个函数生成表格和绘制比例
- python - 在 python 中显示最小/最大输入。得到 TypeError:'int"
- swift - SwiftUI 使用按钮更改视图
- excel - 数组分配适用于 ThisWorkbook 模块,但不适用于 Sheet1 模块
- r - 使用 R 从随机森林模型生成预测栅格?
- raspberry-pi - BCM2835 - L2 缓存一致性,它是如何工作的?
- apache - 从 apache 提供的 Primefaces 静态资源
- mysql - 我需要帮助编写 sql 来加入 3 个表