获取 https://ghrc.io/v2/: net/http: 等待连接时取消请求(等待标头时超出了 Client.Timeout)

Sha*_*ade 0 continuous-integration github docker devops github-actions

我正在使用 github actions 来构建我的图像并将其推送到 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 }}
Run Code Online (Sandbox Code Playgroud)

这里的所有者是大写字母OwnerIN,但标签不支持大写字母,所以我正在使用ownerin

但是当作业运行时,我收到以下错误。构建成功,push 步骤发生错误。

...
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)
Run Code Online (Sandbox Code Playgroud)

我遵循了此处描述的文档和存储库

BMi*_*tch 5

该域名是 ghcr.io(GitHub 容器注册表的缩写),而不是 ghrc.io。这是一个拼写错误,您正在尝试将容器映像推送到互联网上的未知主机。