获取 https://ghrc.io/v2/: net/http: 请求在等待连接时被取消(Client.Timeout 在等待 headers 时超出)
Get https://ghrc.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
我正在使用 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 上的未知主机。
我正在使用 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 上的未知主机。