簡體   English   中英

Docker Hub Registry 無法從 Github 存儲庫構建 docker 鏡像

[英]Docker Hub Registry cannot build docker image from Github repository

兩天以來,我不知道為什么,我無法從Docker Hub Registry使用鏈接的 github 項目構建 docker 映像(以前可以使用)

許多答案都是關於github 子模塊的。這不是我的情況。

這是日志

Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
please ensure the correct public key is added to the list of trusted keys for this repository (128)

我試着搜索,我沒有落在與我無關的答案上。

經過幾個小時的搜索,我想找到了答案。

我把答案放在這里,對於那些會遇到同樣問題的人。

看起來 Docker 已經改變了他的應用程序的名稱。 Docker Hub Registry重命名為Docker Hub Builder

為了修復它,所以我切斷了 Docker 和 Github 之間的應用程序鏈接。 並重新創建鏈接。

它在 Github 中為我添加了一個授權應用程序,圖像寬度的證明Docker Hub Builder

在此處輸入圖片說明

可能有人需要這個。 對我來說,在 Docker-Hub 上單擊 GitHub 帳戶的重新鏈接按鈕解決了問題。

您可以在此頁面重新鏈接: https : //hub.docker.com/settings/linked-accounts

首先,嘗試將您的 GitHub 帳戶重新鏈接到 Docker Hub檢查您的 GitHub 組織的“第三方應用程序訪問策略” ,如之前的答案所建議的那樣。

如果您的 Docker Hub 存儲庫歸某個組織所有,請訪問該組織的Linked Accounts設置並嘗試重新鏈接提供者:

Docker Hub 組織 > 設置 > 關聯賬戶

如果這不能解決問題,請訪問您的 Docker Hub 存儲庫 > Builds > Configure Automated Builds ,然后查看Source repository列表:

Docker Hub > 構建配置 > 源代碼庫

這將顯示 Docker Hub 可以訪問哪些存儲庫。

就我而言,列表中缺少一些存儲庫,因為 Docker Hub 只能看到鏈接的 GitHub 帳戶具有管理員訪問權限的存儲庫。

結論:與 Docker Hub 鏈接的 GitHub 帳戶需要對相關 GitHub 存儲庫的管理員訪問權限

授予GitHub 帳戶管理員訪問相關存儲庫的權限修復了我的 Docker Hub 構建。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM